Skip to content

Commit

Permalink
Python2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
vslinko committed Mar 19, 2013
1 parent 66aa55e commit e2665ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,2 +1,2 @@
__pycache__
*.pyc
samples
6 changes: 3 additions & 3 deletions appdf_parser.py
Expand Up @@ -15,17 +15,17 @@ def parse(file, validate=False):
>>> parse("samples/Yandex.Shell/yandex.shell.appdf", validate=True)
Traceback (most recent call last):
...
lxml.etree.DocumentInvalid: Element 'application': The attribute 'platform' is required but missing., line 7
DocumentInvalid: Element 'application': The attribute 'platform' is required but missing., line 7
>>> parse("404 Not Found")
Traceback (most recent call last):
...
FileNotFoundError: [Errno 2] No such file or directory: '404 Not Found'
IOError: [Errno 2] No such file or directory: '404 Not Found'
>>> parse("Makefile")
Traceback (most recent call last):
...
zipfile.BadZipFile: File is not a zip file
BadZipfile: File is not a zip file
"""
with ZipFile(file, "r") as archive:
if archive.testzip():
Expand Down

0 comments on commit e2665ca

Please sign in to comment.