Commits

S. Joshua Swamidass committed 83d44e0

changed file output if in 'r' mode

  • Participants
  • Parent commits 1e4c6af

Comments (0)

Files changed (1)

File confargparse.py

                 elif f.name == "<stdout>":
                     self.s = "stdout"
                 else:
-                    self.s = "file('%s','%s')" % (f.name, f.mode)
+                    if f.mode == "r":
+                        self.s = "file('%s')" % f.name
+                    else:
+                        self.s = "file('%s','%s')" % (f.name, f.mode)
             else:
                 self.s = repr(f)