Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Romain DEP.
gajim
Commits
39bdea7b
Commit
39bdea7b
authored
Dec 29, 2020
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify imports
parent
ef339e87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
gajim/gui/__init__.py
gajim/gui/__init__.py
+4
-3
No files found.
gajim/gui/__init__.py
View file @
39bdea7b
import
sys
import
importlib
from
importlib.abc
import
MetaPathFinder
from
importlib.util
import
spec_from_file_location
from
pathlib
import
Path
class
GUIFinder
(
importlib
.
abc
.
MetaPathFinder
):
class
GUIFinder
(
MetaPathFinder
):
def
__init__
(
self
,
name
,
fallback
=
None
):
self
.
_path
=
Path
(
__file__
).
parent
.
parent
/
name
...
...
@@ -22,7 +23,7 @@ def find_spec(self, fullname, _path, _target=None):
if
module_path
is
None
:
return
None
spec
=
importlib
.
util
.
spec_from_file_location
(
fullname
,
module_path
)
spec
=
spec_from_file_location
(
fullname
,
module_path
)
return
spec
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment