diff options
| author | Tobin Ehlis <tobine@google.com> | 2017-05-19 08:24:04 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2017-05-19 11:29:29 -0600 |
| commit | 4af6625ecc99cb668de00feefcf7c228420756c9 (patch) | |
| tree | 3f6a9a52210dd058e1ac4634a6ef87f2c8b27b9f /layers | |
| parent | 042c18c2721c33e94759f6a26cb61c5d92e76484 (diff) | |
| download | usermoji-4af6625ecc99cb668de00feefcf7c228420756c9.tar.xz | |
scripts:Correctly parse offline spec w/ Soup
Diffstat (limited to 'layers')
| -rw-r--r-- | layers/spec.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/layers/spec.py b/layers/spec.py index 8c1831fb..5ed7d499 100644 --- a/layers/spec.py +++ b/layers/spec.py @@ -110,7 +110,8 @@ class Specification: self.soup = BeautifulSoup(urllib2.urlopen(spec_url), 'html.parser') else: print ("Making soup from local spec %s, this will take a minute" % (spec_file)) - self.soup = BeautifulSoup(spec_file, 'html.parser') + with open(spec_file, "r") as sf: + self.soup = BeautifulSoup(sf, 'html.parser') self.parseSoup() #print(self.soup.prettify()) def updateDict(self, updated_dict): |
