Skip to content

Commit a42a1db

Browse files
authored
Merge pull request #44 from rosineygp/fix/os-path
Fix/os path
2 parents 197fbaa + 3a64004 commit a42a1db

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ dist
77
*egg-info
88
.coverage
99
*.pyc
10-
htmlcov
10+
htmlcov
11+
env

proxmox_pci_switcher/proxmox_pci_switcher.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,9 @@ def cmd_switch_vm(name, config=DEFAULT_LINUX_PATH):
181181
default=DEFAULT_LINUX_PATH,
182182
)
183183
def gui():
184-
_gui_main = "/ui/main.py"
185-
if os.name == "nt":
186-
_gui_main = "\\ui\\main.py"
187-
188184
# Dynamic ui load
189185
SourceFileLoader(
190-
"ui", f"{os.path.dirname(os.path.realpath(__file__))}{_gui_main}"
186+
"ui", f"{os.path.dirname(os.path.realpath(__file__))}{os.sep}ui{os.sep}main.py"
191187
).load_module()
192188

193189

proxmox_pci_switcher/ui/main.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from kivymd.uix.snackbar import Snackbar
66
from kivy.clock import Clock
77
from kivy import Logger
8+
import os
89

910
from proxmox_pci_switcher import (
1011
DEFAULT_LINUX_PATH,
@@ -103,7 +104,7 @@ def on_start(self, *args):
103104
self.main_list_load()
104105

105106
self.title = "Proxmox PCI Switcher"
106-
self.icon = "logo.png"
107+
self.icon = f"{os.path.dirname(os.path.realpath(__file__))}{os.sep}logo.png"
107108

108109
if not self._clock_init:
109110
self._clock_init = True

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
proxmoxer==1.3.1
22
requests==2.27.1
3-
paramiko==2.10.4
3+
paramiko==2.11.0
44
argh==0.26.2
55
PyYAML==6.0
66
tabulate==0.8.9

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
install_requires=[
2929
"proxmoxer==1.3.1",
3030
"requests==2.27.1",
31-
"paramiko==2.10.4",
31+
"paramiko==2.11.0",
3232
"argh==0.26.2",
3333
"PyYAML==6.0",
3434
"tabulate==0.8.9",

0 commit comments

Comments
 (0)