diff mercurial/util.py @ 12387:4f8067c94729

cleanup: use x in (a, b) instead of x == a or x == b
author Brodie Rao <brodie@bitheap.org>
date Thu, 23 Sep 2010 00:02:31 -0500
parents e0ee3e822a9a
children 4cdaf1adafc8
line wrap: on
line diff
--- a/mercurial/util.py	Thu Sep 23 10:59:21 2010 +0200
+++ b/mercurial/util.py	Thu Sep 23 00:02:31 2010 -0500
@@ -640,7 +640,7 @@
     # If name is absolute, make it relative
     if name.lower().startswith(root.lower()):
         l = len(root)
-        if name[l] == os.sep or name[l] == os.altsep:
+        if name[l] in (os.sep, os.altsep):
             l = l + 1
         name = name[l:]
 
@@ -1008,7 +1008,7 @@
             hours = int(tz[1:3])
             minutes = int(tz[3:5])
             return -sign * (hours * 60 + minutes) * 60
-        if tz == "GMT" or tz == "UTC":
+        if tz in ("GMT", "UTC"):
             return 0
         return None