Permalink
Browse files

Issue 17059: Unify return type of is_binary in GetBaseFile.

git-svn-id: http://rietveld.googlecode.com/svn/trunk@396 e30e9e8f-1b4c-0410-881d-6f13584adfe0
  • Loading branch information...
albrecht.andi
albrecht.andi committed Feb 17, 2009
1 parent 69d913a commit bf75b594c6d2a62b19b28766bb42a82f2ead4bef
Showing with 2 additions and 2 deletions.
  1. +2 −2 static/upload.py
View
@@ -910,7 +910,7 @@ def GetBaseFile(self, filename):
mimetype = RunShell(["svn", "propget", "svn:mime-type", filename],
silent_ok=True)
base_content = ""
is_binary = mimetype and not mimetype.startswith("text/")
is_binary = bool(mimetype) and not mimetype.startswith("text/")
if is_binary and self.IsImage(filename):
new_content = self.ReadFile(filename)
elif (status[0] in ("M", "D", "R") or
@@ -930,7 +930,7 @@ def GetBaseFile(self, filename):
# Reset mimetype, it contains an error message.
mimetype = ""
get_base = False
is_binary = mimetype and not mimetype.startswith("text/")
is_binary = bool(mimetype) and not mimetype.startswith("text/")
if status[0] == " ":
# Empty base content just to force an upload.
base_content = ""

0 comments on commit bf75b59

Please sign in to comment.