[server] deal with Python bug #16308

This commit is contained in:
Fabio Erculiani
2013-08-23 10:58:04 +02:00
parent 385c2934c5
commit 51ea669c02
6 changed files with 24 additions and 0 deletions

View File

@@ -120,6 +120,10 @@ package and repository files through *gnupg*.
sys.stderr.write("%s\n" % (err,))
return parser.print_help, []
# Python 3.3 bug #16308
if not hasattr(nsargs, "func"):
return parser.print_help, []
self._nsargs = nsargs
return self._call_locked, [nsargs.func, nsargs.repo]

View File

@@ -88,6 +88,10 @@ list notice-board titles for user consumption.
except IOError:
return parser.print_help, []
# Python 3.3 bug #16308
if not hasattr(nsargs, "func"):
return parser.print_help, []
self._repository_id = nsargs.repo
return self._call_locked, [nsargs.func, self._repository_id]

View File

@@ -159,6 +159,10 @@ tools.
sys.stderr.write("%s\n" % (err,))
return parser.print_help, []
# Python 3.3 bug #16308
if not hasattr(nsargs, "func"):
return parser.print_help, []
self._repository_id = nsargs.inrepo
self._quiet = nsargs.quiet
self._verbose = getattr(nsargs, "verbose", self._verbose)

View File

@@ -85,6 +85,10 @@ Manage (add, remove, list) configured repositories.
sys.stderr.write("%s\n" % (err,))
return parser.print_help, []
# Python 3.3 bug #16308
if not hasattr(nsargs, "func"):
return parser.print_help, []
self._nsargs = nsargs
return self._call_locked, [nsargs.func, None]

View File

@@ -107,6 +107,10 @@ Manage Entropy Server Repositories.
sys.stderr.write("%s\n" % (err,))
return parser.print_help, []
# Python 3.3 bug #16308
if not hasattr(nsargs, "func"):
return parser.print_help, []
self._nsargs = nsargs
return self._call_locked, [nsargs.func, None]

View File

@@ -108,6 +108,10 @@ Toolset containing all the Entropy Server built-in QA tests available.
except IOError as err:
return parser.print_help, []
# Python 3.3 bug #16308
if not hasattr(nsargs, "func"):
return parser.print_help, []
self._nsargs = nsargs
return self._call_locked, [nsargs.func, None]