diff hglib/util.py @ 86:f98d6e234cd9

util: eliminate py2.6 if/else expression
author Matt Mackall <mpm@selenic.com>
date Thu, 17 Nov 2011 12:53:41 -0600
parents 4282391dd693
children 1b47146a4a2c
line wrap: on
line diff
--- a/hglib/util.py	Thu Nov 10 17:45:57 2011 -0600
+++ b/hglib/util.py	Thu Nov 17 12:53:41 2011 -0600
@@ -81,7 +81,10 @@
 
         arg = arg.replace('_', '-')
         if arg != '-':
-            arg = '-' + arg if len(arg) == 1 else '--' + arg
+            if len(arg) == 1:
+                arg = '-' + arg
+            else:
+                arg = '--' + arg
         if isinstance(val, bool):
             if val:
                 cmd.append(arg)