exttools thinks exttools.pyo is a directory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TOSCA Parser |
Fix Released
|
High
|
Sharat Sharma | ||
Gentoo Linux |
New
|
Undecided
|
Unassigned |
Bug Description
Exception thrown:
$ tosca-parser --template-
Traceback (most recent call last):
File "/usr/lib/
from toscaparser.shell import main
File "/usr/lib64/
from toscaparser.
File "/usr/lib64/
import toscaparser.imports
File "/usr/lib64/
from toscaparser.
File "/usr/lib64/
class TypeValidation(
File "/usr/lib64/
exttools = ExtTools()
File "/usr/lib64/
self.
File "/usr/lib64/
ext_files = [f for f in os.listdir(extpath) if f.endswith('.py')
OSError: [Errno 20] Not a directory: '/usr/lib64/
Suggested fix:
diff --git a/toscaparser/
index 963b958..cebef14 100644
--- a/toscaparser/
+++ b/toscaparser/
@@ -36,7 +36,7 @@ class ExtTools(object):
extdirs = [e for e in os.listdir(
- not e.endswith('.pyc') and not e.endswith('.py')]
+ not e.endswith('.pyc') and not e.endswith('.py') and not e.endswith('.pyo')]
for e in extdirs:
pyo files are optimised compiled byte files.
Changed in tosca-parser: | |
assignee: | nobody → Sharat Sharma (sharat-sharma) |
@Paul, thanks much for reporting it and providing a fix.
@Sharat, are you still planning to work on it? Seems like a quick fix.