1. Tarek Ziadé
  2. flake8


Ian Cordasco  committed 5742399

Update this to deal with Marc and Bruno's names

Strings are hard, let's introduce hacks.

  • Participants
  • Parent commits 5cc94cb
  • Branches default

Comments (0)

Files changed (1)

File bin/git-patch-to-hg-export.py

View file
     # NOTE: there will still be an index line after each diff --git, but it
     # will be ignored
     for line in fin:
-        fout.write(line)
+        fout.write(line.encode('utf-8'))
     # NOTE: the --/version will still be at the end, but it will be ignored
             import requests
             import io
             resp = requests.get(sys.argv[1])
-            return io.StringIO(resp.content) if resp.ok else io.StringIO('')
+            if resp.ok:
+                return io.StringIO(resp.content.decode('utf-8'))
+            else:
+                return io.StringIO('')
         elif os.path.exists(sys.argv[1]):
             return open(sys.argv[1])
     return sys.stdin