[client] deal with Python bug #16308

This commit is contained in:
Fabio Erculiani
2013-08-23 10:57:36 +02:00
parent a0cd08d1de
commit 385c2934c5
10 changed files with 41 additions and 0 deletions
+5
View File
@@ -163,6 +163,11 @@ if __name__ == "__main__":
parser.print_help()
raise SystemExit(1)
# Python 3.3 bug #16308
if not hasattr(nsargs, "func"):
parser.print_help()
raise SystemExit(1)
try:
rc = nsargs.func(nsargs)
except KeyboardInterrupt:
+4
View File
@@ -61,6 +61,10 @@ class SoloManage(SoloCommand):
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]
+4
View File
@@ -86,6 +86,10 @@ Manage Entropy Library Cache.
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]
+4
View File
@@ -94,6 +94,10 @@ Manage package file updates.
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]
+4
View File
@@ -169,6 +169,10 @@ Execute advanced tasks on Entropy packages and the running system.
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]
+4
View File
@@ -329,6 +329,10 @@ Repository query 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._nsargs = nsargs
return self._call_locked, [nsargs.func]
+4
View File
@@ -171,6 +171,10 @@ Manage Entropy 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]
+4
View File
@@ -150,6 +150,10 @@ Tools to rescue the running system.
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]
+4
View File
@@ -190,6 +190,10 @@ System security 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._nsargs = nsargs
return self._call_locked, [nsargs.func]
+4
View File
@@ -173,6 +173,10 @@ Manage User Generate Content (votes, comments, files).
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]