summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/excellon.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-06-13 15:13:29 +0200
committerjaseg <git@jaseg.de>2021-06-13 15:13:29 +0200
commit4bb99811221d0cbbf52e6ab59a76bbe6bd8fba6c (patch)
tree9b491f11c2c77c5e8de8b74eed75162838c5dbf5 /gerbonara/gerber/excellon.py
parent83e498b8917e0b3287871c27a4acc95634acab2e (diff)
downloadgerbonara-4bb99811221d0cbbf52e6ab59a76bbe6bd8fba6c.tar.gz
gerbonara-4bb99811221d0cbbf52e6ab59a76bbe6bd8fba6c.tar.bz2
gerbonara-4bb99811221d0cbbf52e6ab59a76bbe6bd8fba6c.zip
Make pcb-tools pytest pass without warnings
Diffstat (limited to 'gerbonara/gerber/excellon.py')
-rwxr-xr-xgerbonara/gerber/excellon.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gerbonara/gerber/excellon.py b/gerbonara/gerber/excellon.py
index 5ab062a..5a9d16d 100755
--- a/gerbonara/gerber/excellon.py
+++ b/gerbonara/gerber/excellon.py
@@ -54,7 +54,7 @@ def read(filename):
"""
# File object should use settings from source file by default.
- with open(filename, 'rU') as f:
+ with open(filename, 'r') as f:
data = f.read()
settings = FileSettings(**detect_excellon_format(data))
return ExcellonParser(settings).parse(filename)
@@ -426,7 +426,7 @@ class ExcellonParser(object):
return len(self.hits)
def parse(self, filename):
- with open(filename, 'rU') as f:
+ with open(filename, 'r') as f:
data = f.read()
return self.parse_raw(data, filename)
@@ -818,7 +818,7 @@ def detect_excellon_format(data=None, filename=None):
if data is None and filename is None:
raise ValueError('Either data or filename arguments must be provided')
if data is None:
- with open(filename, 'rU') as f:
+ with open(filename, 'r') as f:
data = f.read()
# Check for obvious clues: