unknown-cli 0.9.7__tar.gz → 0.9.10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/PKG-INFO +1 -1
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknown_cli.egg-info/PKG-INFO +1 -1
- unknown-cli-0.9.10/unknowncli/VERSION +1 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/utils.py +12 -3
- unknown-cli-0.9.7/unknowncli/VERSION +0 -1
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/README.md +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/setup.cfg +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/setup.py +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknown_cli.egg-info/SOURCES.txt +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknown_cli.egg-info/dependency_links.txt +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknown_cli.egg-info/entry_points.txt +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknown_cli.egg-info/requires.txt +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknown_cli.egg-info/top_level.txt +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/__init__.py +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/__main__.py +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/commands/__init__.py +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/commands/preflight.py +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/commands/project.py +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/commands/task.py +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/commands/unreal.py +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/data/.p4ignore.txt +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/set_registry_keys.py +0 -0
- {unknown-cli-0.9.7 → unknown-cli-0.9.10}/unknowncli/set_url_handler.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.9.10
|
|
@@ -5,6 +5,7 @@ import botocore.session
|
|
|
5
5
|
from datetime import datetime, timedelta
|
|
6
6
|
import requests
|
|
7
7
|
import click
|
|
8
|
+
import ctypes
|
|
8
9
|
import typer
|
|
9
10
|
import configparser
|
|
10
11
|
import logging
|
|
@@ -239,12 +240,20 @@ def check_version():
|
|
|
239
240
|
if (v != my_version):
|
|
240
241
|
upgrade_cmd = "pip install unknown-cli -U"
|
|
241
242
|
secho(f"\nVersion {v} of this tool is available while you are on version {my_version}.", fg="yellow")
|
|
243
|
+
|
|
244
|
+
is_admin = ctypes.windll.shell32.IsUserAnAdmin()
|
|
245
|
+
if not is_admin:
|
|
246
|
+
secho(f"Upgrade suggested, run any unk command again in an administrator prompt or run this manually: {upgrade_cmd}.", fg="yellow")
|
|
247
|
+
return
|
|
248
|
+
|
|
242
249
|
if confirm("(RECOMMENDED) Upgrade now?", prompt_suffix=""):
|
|
243
250
|
if call(f"{sys.executable} -m {upgrade_cmd}") != 0:
|
|
244
|
-
abort("Upgrade failed, please try posting this in Slack, or try running the command manually: {upgrade_cmd}")
|
|
251
|
+
abort(f"Upgrade failed, please try posting this in Slack, or try running the command manually: {upgrade_cmd}")
|
|
245
252
|
secho(f"\nUpgrade successful! Please run your original request or command again.", fg="green", bold=True)
|
|
246
253
|
sys.exit(0)
|
|
254
|
+
|
|
247
255
|
secho(f"Please upgrade this tool using: {upgrade_cmd}\n", fg="yellow", bold=True)
|
|
256
|
+
return
|
|
248
257
|
else:
|
|
249
258
|
with version_check_file.open("w") as f:
|
|
250
259
|
f.write(f"{fmt_date(datetime.utcnow())}")
|
|
@@ -317,7 +326,7 @@ def check_p4trust():
|
|
|
317
326
|
for ssl_connection in ssl_connection_list:
|
|
318
327
|
p4_port = ssl_connection.replace("ssl:", "")
|
|
319
328
|
matching_trust_line = next(
|
|
320
|
-
(t for t in trust_line_list if t.startswith(p4_port) and t.endswith(P4_TRUST)),
|
|
329
|
+
(t for t in trust_line_list if t.startswith(p4_port) and t.endswith(P4_TRUST)),
|
|
321
330
|
None
|
|
322
331
|
)
|
|
323
332
|
if matching_trust_line:
|
|
@@ -348,7 +357,7 @@ def set_url_handler(force=False):
|
|
|
348
357
|
raise
|
|
349
358
|
except:
|
|
350
359
|
add_key = True
|
|
351
|
-
|
|
360
|
+
|
|
352
361
|
if add_key:
|
|
353
362
|
path = Path(__file__).parent / "set_url_handler.py"
|
|
354
363
|
cmd = f"{sys.executable} \"{path.resolve()}\" {exe}"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.9.7
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|