Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0.1, 1.0.2, and 1.0.3

stable shlib, clone: prevent None paths from causing problems

Closes #1044

Changeset fc1891e16ab4

Parent 97447b5e736a

by Steve Borho

Changes to 2 files · Browse files at fc1891e16ab4 Showing diff from parent 97447b5e736a Diff from another changeset...

 
186
187
188
189
 
 
190
191
192
 
186
187
188
 
189
190
191
192
193
@@ -186,7 +186,8 @@
  self.add_src_to_recent(src)   self.add_dest_to_recent(dest)   if returncode == 0: - shlib.shell_notify([dest]) + if dest: + shlib.shell_notify([dest])   self.cmd.set_result(_('Cloned successfully'), style='ok')   elif useraborted:   self.cmd.set_result(_('Canceled updating'), style='error')
 
40
41
42
 
 
43
44
45
 
143
144
145
146
 
 
147
148
149
 
40
41
42
43
44
45
46
47
 
145
146
147
 
148
149
150
151
152
@@ -40,6 +40,8 @@
  return   dirs = set()   for path in paths: + if path is None: + continue   abspath = os.path.abspath(path)   if not os.path.isdir(abspath):   abspath = os.path.dirname(abspath) @@ -143,7 +145,8 @@
  return   f_notify = open(notify, 'w')   try: - f_notify.write('\n'.join([os.path.abspath(path) for path in paths])) + abspaths = [os.path.abspath(path) for path in paths if path] + f_notify.write('\n'.join(abspaths))   finally:   f_notify.close()