Handle when the slicemap option is an empty string
authorStefan Rusek <stefan@rusek.org>
Wed, 11 Feb 2009 21:47:57 +0100
changeset 7774 3b8f2750efcf
parent 7773 607de5bd3578
child 7775 5280c39778b6
Handle when the slicemap option is an empty string In the cmdtable for the convert extension, the default value for splicefile is empty string, while mapfile (the class that reads splicemaps) expects either a real path or None. This patch changes mapfile to expect a real path or logical false (False, None, empty string, etc.)
hgext/convert/common.py
--- a/hgext/convert/common.py	Sun Feb 08 13:46:04 2009 +0100
+++ b/hgext/convert/common.py	Wed Feb 11 21:47:57 2009 +0100
@@ -325,7 +325,7 @@
         self._read()
 
     def _read(self):
-        if self.path is None:
+        if not self.path:
             return
         try:
             fp = open(self.path, 'r')