Skip to content

Commit

Permalink
rm pkgutil
Browse files Browse the repository at this point in the history
  • Loading branch information
mbridak committed Nov 16, 2023
1 parent db6136c commit 9c0d63b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions not1mm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import logging
import os

import pkgutil
# import pkgutil
import platform
import re
import socket
Expand Down Expand Up @@ -62,9 +62,9 @@
from not1mm.lib.versiontest import VersionTest

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())

DATA_PATH = os.environ.get("XDG_DATA_HOME", str(Path.home() / ".local" / "share"))
DATA_PATH += "/not1mm"
Expand Down
8 changes: 4 additions & 4 deletions not1mm/bandmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import logging
import os

import pkgutil
# import pkgutil
import platform
import sys
import sqlite3
Expand All @@ -30,9 +30,9 @@
UPDATE_INTERVAL = 2000

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())

if "XDG_DATA_HOME" in os.environ:
DATA_PATH = os.environ.get("XDG_DATA_HOME")
Expand Down
8 changes: 4 additions & 4 deletions not1mm/checkwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import logging

import pkgutil
# import pkgutil
import platform
import queue
import os
Expand All @@ -28,9 +28,9 @@
os.environ["QT_QPA_PLATFORMTHEME"] = "gnome"

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())

if "XDG_DATA_HOME" in os.environ:
DATA_PATH = os.environ.get("XDG_DATA_HOME")
Expand Down
8 changes: 4 additions & 4 deletions not1mm/logwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import math
import os

import pkgutil
# import pkgutil
import platform
import queue
import sys
Expand All @@ -30,9 +30,9 @@
os.environ["QT_QPA_PLATFORMTHEME"] = "gnome"

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())

if "XDG_DATA_HOME" in os.environ:
DATA_PATH = os.environ.get("XDG_DATA_HOME")
Expand Down
8 changes: 4 additions & 4 deletions not1mm/vfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import os

import pkgutil
# import pkgutil
import platform
import queue
import sys
Expand All @@ -29,9 +29,9 @@
os.environ["QT_QPA_PLATFORMTHEME"] = "gnome"

# DeprecationWarning: 'pkgutil.get_loader' is deprecated and slated for removal in Python 3.14
loader = pkgutil.get_loader("not1mm")
WORKING_PATH = os.path.dirname(loader.get_filename())
# WORKING_PATH = os.path.dirname(__loader__.get_filename())
# loader = pkgutil.get_loader("not1mm")
# WORKING_PATH = os.path.dirname(loader.get_filename())
WORKING_PATH = os.path.dirname(__loader__.get_filename())

if "XDG_DATA_HOME" in os.environ:
DATA_PATH = os.environ.get("XDG_DATA_HOME")
Expand Down

0 comments on commit 9c0d63b

Please sign in to comment.