Skip to content

Instantly share code, notes, and snippets.

@priyankajayaswal1
Created April 9, 2015 05:14
Show Gist options
  • Select an option

  • Save priyankajayaswal1/ad7f6e7291460cffecc3 to your computer and use it in GitHub Desktop.

Select an option

Save priyankajayaswal1/ad7f6e7291460cffecc3 to your computer and use it in GitHub Desktop.
diff --git a/scripts/replace.py b/scripts/replace.py
index 56fcab5..8d2d119 100644
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -804,7 +804,7 @@ def main(*args):
try:
with codecs.open(replacement_file, 'r', 'utf-8') as f:
commandline_replacements.extend(
- line.lstrip(u'\uFEFF').rstrip('\r\n') for line in f)
+ line.rstrip('\r\n') for line in f.readlines())
except (IOError, OSError) as e:
pywikibot.error('Error loading {0}: {1}'.format(
replacement_file, e))
(END)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment