We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95da470 commit a84ddaeCopy full SHA for a84ddae
selfdrive/version.py
@@ -55,11 +55,15 @@ def get_origin(default: Optional[str] = None) -> Optional[str]:
55
56
@cache
57
def get_normalized_origin(default: Optional[str] = None) -> Optional[str]:
58
- return get_origin()\
59
- .replace("git@", "", 1)\
60
- .replace(".git", "", 1)\
61
- .replace("https://", "", 1)\
62
- .replace(":", "/", 1)
+ origin = get_origin()
+
+ if origin is None:
+ return default
63
+ return origin.replace("git@", "", 1) \
64
+ .replace(".git", "", 1) \
65
+ .replace("https://", "", 1) \
66
+ .replace(":", "/", 1)
67
68
69
0 commit comments