refactor: clean up get_path function and remove unnecessary print statement
Some checks are pending
Docker Image CI / build (push) Waiting to run
Some checks are pending
Docker Image CI / build (push) Waiting to run
This commit is contained in:
parent
ba9e42b9c6
commit
8ca8225122
@ -7,8 +7,6 @@ def get_path():
|
||||
splitted = pwd.split("/")
|
||||
splitted[-1] = splitted[-1].replace("\n", "")
|
||||
|
||||
print(splitted[: splitted.index("webscraper") + 1])
|
||||
|
||||
if splitted.count("webscraper") > 1 and "webscraper" in splitted:
|
||||
for i in range(len(splitted) - 1, -1, -1):
|
||||
potential_path = "/".join(splitted[: i + 1])
|
||||
@ -19,7 +17,8 @@ def get_path():
|
||||
else:
|
||||
return "This is not a valid webscraper project."
|
||||
else:
|
||||
return "/".join(splitted[: splitted.index("webscraper") + 1])
|
||||
path = "/".join(splitted[: splitted.index("webscraper") + 1])
|
||||
return path
|
||||
|
||||
|
||||
def run_main():
|
||||
|
@ -1,5 +1,4 @@
|
||||
import subprocess
|
||||
import os
|
||||
from run_command import run_command
|
||||
from get_path import get_path
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user