Skip to content

Commit

Permalink
remove f-strings for now - they are only in 3.6+ and we want to suppo…
Browse files Browse the repository at this point in the history
…rt python 3.5
  • Loading branch information
jfischer committed Mar 27, 2020
1 parent 47dbbd8 commit 681fce1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dataworkspaces/resources/rclone_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class RemoteOriginType(ParamType):
"""
def parse(self, str_value:str) -> str:
if ':' not in str_value:
raise ParamParseError(f"Remote origin '{str_value}' is missing a ':', should be of the form remote:path")
raise ParamParseError("Remote origin '%s' is missing a ':', should be of the form remote:path"%
str_value)
(remote_name, rpath) = str_value.split(':')
if os.path.isabs(rpath):
return str_value
Expand All @@ -43,9 +44,9 @@ def parse(self, str_value:str) -> str:

def validate(self, value:Any) -> None:
if not isinstance(value, str):
raise ParamValidationError(f"Remote origin '{repr(value)}' is not a string")
raise ParamValidationError("Remote origin '%s' is not a string"% repr(value))
if ':' not in value:
raise ParamValidationError(f"Remote origin '{value}' is missing a ':', should be of the form remote:path")
raise ParamValidationError("Remote origin '%s' is missing a ':', should be of the form remote:path"%value)

def __str__(self):
return 'remote_origin'
Expand Down Expand Up @@ -198,7 +199,7 @@ def snapshot_precheck(self) -> None:

def snapshot(self) -> Tuple[Optional[str], Optional[str]]:
if self.workspace.verbose:
print(f"In snapshot: {self.remote_origin} {self.local_path}")
print("In snapshot: %s %s"% (self.remote_origin, self.local_path))
if self.compute_hash:
(ret, out) = self.rclone.check(self.remote_origin, self.local_path, flags=['--one-way'])
else:
Expand Down

0 comments on commit 681fce1

Please sign in to comment.