samba-tool: Avoid use of "except .. as" construction introduced in python2.6.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 7 Sep 2011 18:31:05 +0000 (20:31 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 7 Sep 2011 22:34:22 +0000 (00:34 +0200)
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Sep  8 00:34:22 CEST 2011 on sn-devel-104

source4/scripting/bin/samba-tool

index c24c0e38dbc2124051eef376b744e4d14dd4d167..7d662308a2efe423f39c051c7840869da36eed44 100755 (executable)
@@ -23,7 +23,8 @@ import sys
 sys.path.insert(0, "bin/python")
 
 from samba import netcmd
-from samba.netcmd import Command, CommandError, Option
+from samba.netcmd import Command, CommandError
+
 
 class MainCommand(Command):
     """Main class for samba tool commands"""
@@ -73,5 +74,5 @@ if __name__ == '__main__':
     try:
         retval = cmd._run("samba-tool", command, *args)
         sys.exit(retval)
-    except Exception as e:
+    except Exception, e:
         cmd.show_command_error(e)