Skip to content
Snippets Groups Projects
Commit 4f10d76f authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix a few comparisons to None in py

parent c4ed337d
No related branches found
No related tags found
1 merge request!35Convert viewer tree to utilize python3
...@@ -63,7 +63,7 @@ def start_client(grid, slurl, build_config, my_args): ...@@ -63,7 +63,7 @@ def start_client(grid, slurl, build_config, my_args):
if __name__ == "__main__": if __name__ == "__main__":
grid = llstart.get_config("grid") grid = llstart.get_config("grid")
if grid == None: if grid is None:
grid = "aditi" grid = "aditi"
build_config = llstart.get_config("build_config") build_config = llstart.get_config("build_config")
...@@ -81,7 +81,7 @@ def start_client(grid, slurl, build_config, my_args): ...@@ -81,7 +81,7 @@ def start_client(grid, slurl, build_config, my_args):
sys.exit(0) sys.exit(0)
slurl = llstart.get_config("slurl") slurl = llstart.get_config("slurl")
if slurl == None: if slurl is None:
if region is None: if region is None:
region = llstart.get_user_name() region = llstart.get_user_name()
slurl = "//%s/128/128/" % (region) slurl = "//%s/128/128/" % (region)
......
...@@ -570,7 +570,7 @@ def put_in_file(self, contents, dst, src=None): ...@@ -570,7 +570,7 @@ def put_in_file(self, contents, dst, src=None):
return dst_path return dst_path
def replace_in(self, src, dst=None, searchdict={}): def replace_in(self, src, dst=None, searchdict={}):
if dst == None: if dst is None:
dst = src dst = src
# read src # read src
with open(self.src_path_of(src), 'r', encoding='utf-8') as f: with open(self.src_path_of(src), 'r', encoding='utf-8') as f:
...@@ -837,9 +837,9 @@ def path2basename(self, path, file): ...@@ -837,9 +837,9 @@ def path2basename(self, path, file):
def path(self, src, dst=None, err_if_missing=True): def path(self, src, dst=None, err_if_missing=True):
sys.stdout.flush() sys.stdout.flush()
if src == None: if src is None:
raise ManifestError("No source file, dst is " + dst) raise ManifestError("No source file, dst is " + dst)
if dst == None: if dst is None:
dst = src dst = src
dst = os.path.join(self.get_dst_prefix(), dst) dst = os.path.join(self.get_dst_prefix(), dst)
sys.stdout.write("Processing %s => %s ... " % (src, self._relative_dst_path(dst))) sys.stdout.write("Processing %s => %s ... " % (src, self._relative_dst_path(dst)))
...@@ -891,7 +891,7 @@ def path_optional(self, src, dst=None): ...@@ -891,7 +891,7 @@ def path_optional(self, src, dst=None):
or a list containing dst (present). Concatenate these or a list containing dst (present). Concatenate these
return values to get a list of all libs that are present. return values to get a list of all libs that are present.
""" """
if dst == None: if dst is None:
dst = src dst = src
# This was simple before we started needing to pass # This was simple before we started needing to pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment