Skip to content

Commit 2cead84

Browse files
committed
Update main.py
Fix file path equals None if enter nothing when file path prompt
1 parent c26f085 commit 2cead84

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

main.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
ALTSTORE_VERSION = "1_6_3"
3232
NETMUXD_VERSION = "v0.1.4"
3333
ANISETTE_SERVER_VERSION = "2.1.0"
34-
SCRIPT_VERSION = "0.1.1"
34+
SCRIPT_VERSION = "0.1.2"
3535

3636
# PATH AND URL
3737
ALTSERVER_PATH = os.path.join(RESOURCE_DIRECTORY, "AltServer")
@@ -261,13 +261,17 @@ def getAccount(self):
261261
def getPassword(self):
262262
pd = getpass.getpass("Enter password of the Apple ID : ")
263263
self.password = pd
264-
264+
265265
def selectFile(self):
266266
answer = getAnswer(
267267
"Do you want to install AltStore ? (y/n) [n for select your own iPA] : ").lower()
268268
if answer == 'n':
269269
filePath = getAnswer("Enter the absolute path of the file : ")
270-
self.filePath = filePath if filePath != "" else self.selectFile()
270+
if filePath != "":
271+
self.filePath = filePath
272+
else:
273+
self.filePath = None
274+
print("No file path entered")
271275
else:
272276
self.filePath = ALTSTORE_PATH
273277

@@ -306,6 +310,8 @@ def main():
306310
installaion_manager.getAccount()
307311
installaion_manager.getPassword()
308312
installaion_manager.selectFile()
313+
if installaion_manager.filePath == None:
314+
continue
309315
DebugPrint(installaion_manager.getInfo())
310316
installaion_manager.run()
311317

@@ -378,4 +384,3 @@ def main():
378384
f"RUNNING AT {CURRENT_DIRECTORY} , RESOURCE_DIR : {RESOURCE_DIRECTORY}")
379385
DebugPrint(f"ARCH : {ARCH} , NETMUXD_AVAILABLE : {NETMUXD_IS_AVAILABLE}")
380386
main()
381-

0 commit comments

Comments
 (0)