Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-05 00:31:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-05 00:31:19 +0400
commit42426f816bafae5d863f16dcb05135dfa773e387 (patch)
tree4c2db45540a83fc8ee19d323fa611924f379ac1c /netrender
parent30ab42921b158414caab48b6c94a3a988be5ed78 (diff)
code cleanup: python - pass multiple args to string startswith() / endswith() functions rather than calling multiple times.
Diffstat (limited to 'netrender')
-rw-r--r--netrender/master_html.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/netrender/master_html.py b/netrender/master_html.py
index 8ee0fe4f..e358c7e2 100644
--- a/netrender/master_html.py
+++ b/netrender/master_html.py
@@ -41,7 +41,7 @@ def countFiles(job):
for file in job.files:
if file.filepath.endswith(".bphys"):
tot_cache += 1
- elif file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz"):
+ elif file.filepath.endswith((".bobj.gz", ".bvel.gz")):
tot_fluid += 1
elif not file == job.files[0]:
tot_other += 1
@@ -166,10 +166,10 @@ def get(handler):
if file.filepath.endswith(".bphys") and (file_type & CACHE_FILES):
message.append(filedata);
continue
- if (file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz")) and (file_type & FLUID_FILES):
+ if file.filepath.endswith((".bobj.gz", ".bvel.gz")) and (file_type & FLUID_FILES):
message.append(filedata);
continue
- if (not file == job.files[0]) and (file_type & OTHER_FILES) and ( not (file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz"))) and not file.filepath.endswith(".bphys"):
+ if (not file == job.files[0]) and (file_type & OTHER_FILES) and (not file.filepath.endswith((".bobj.gz", ".bvel.gz"))) and not file.filepath.endswith(".bphys"):
message.append(filedata);
continue
@@ -470,7 +470,7 @@ def get(handler):
if tot_fluid > 0:
rowTable("%i fluid bake files" % tot_fluid, class_style = "toggle", extra = "onclick='toggleDisplay(&quot;.fluid&quot;, &quot;none&quot;, &quot;table-row&quot;)'")
for file in job.files:
- if file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz"):
+ if file.filepath.endswith((".bobj.gz", ".bvel.gz")):
rowTable(os.path.split(file.filepath)[1], class_style = "fluid")
if tot_other > 0:
@@ -478,7 +478,7 @@ def get(handler):
for file in job.files:
if (
not file.filepath.endswith(".bphys")
- and not file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz")
+ and not file.filepath.endswith((".bobj.gz", ".bvel.gz"))
and not file == job.files[0]
):