aboutsummaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authortassaron2017-06-24 23:12:41 -0400
committertassaron2017-06-24 23:12:41 -0400
commite32ba958cb95146728d4985221b08c7e01b35470 (patch)
tree1fce99082617a5a92a758851e51c32999774d212 /src/core.py
parent4d955c5a06d8d77c968f594a85b71b516919bcfb (diff)
fixing bugs
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/core.py b/src/core.py
index c80d60e..89c1e86 100644
--- a/src/core.py
+++ b/src/core.py
@@ -29,6 +29,7 @@ class Core():
else:
# unfrozen
self.wd = os.path.dirname(os.path.realpath(__file__))
+ self.componentsPath = os.path.join(self.wd, 'components')
self.loadEncoderOptions()
self.videoFormats = Core.appendUppercase([
@@ -66,14 +67,12 @@ class Core():
def findComponents(self):
def findComponents():
- srcPath = os.path.join(self.wd, 'components')
- if os.path.exists(srcPath):
- for f in sorted(os.listdir(srcPath)):
- name, ext = os.path.splitext(f)
- if name.startswith("__"):
- continue
- elif ext == '.py':
- yield name
+ for f in sorted(os.listdir(self.componentsPath)):
+ name, ext = os.path.splitext(f)
+ if name.startswith("__"):
+ continue
+ elif ext == '.py':
+ yield name
self.modules = [
import_module('components.%s' % name)
for name in findComponents()
@@ -93,10 +92,12 @@ class Core():
return None
component = self.modules[moduleIndex].Component(
- moduleIndex, compPos, self)
+ moduleIndex, compPos, self
+ )
self.selectedComponents.insert(
compPos,
- component)
+ component
+ )
self.componentListChanged()
# init component's widget for loading/saving presets