Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
N/A

Signed-off-by: Dawn India <[email protected]>
  • Loading branch information
Dawn-India committed Aug 14, 2024
1 parent 47251ad commit 0977a75
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bot/helper/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,6 @@ def getConfigPath(self, dest):
)

async def isTokenExists(self, path, status):
if not self.upDest:
raise ValueError("No Upload Destination!")
if (
not is_gdrive_id(self.upDest) # type: ignore
and not is_rclone_path(self.upDest) # type: ignore
):
raise ValueError("Wrong Upload Destination!")
if is_rclone_path(path):
config_path = self.getConfigPath(path)
if (
Expand Down Expand Up @@ -477,6 +470,13 @@ async def beforeStart(self):
self.userDict.get("gdrive_id")
or config_dict["GDRIVE_ID"]
)
if not self.upDest:
raise ValueError("No Upload Destination!")
if (
not is_gdrive_id(str(self.upDest))
and not is_rclone_path(str(self.upDest))
):
raise ValueError("Wrong Upload Destination!")
if (
self.upDest
not in [
Expand Down

0 comments on commit 0977a75

Please sign in to comment.