mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-26 06:08:38 +01:00
fix: again renaming, the last one, I promise!
This commit is contained in:
@@ -203,7 +203,7 @@ class Email(object):
|
||||
if re.search("\.\.", fname):
|
||||
return None
|
||||
path = "/static/tmp/" + fname
|
||||
fp = open(settings.MAILNG_DIR + path, "wb")
|
||||
fp = open(settings.MODOBOA_DIR + path, "wb")
|
||||
fp.write(part.get_payload(decode=True))
|
||||
fp.close()
|
||||
return path
|
||||
|
||||
@@ -7,13 +7,13 @@ register = template.Library()
|
||||
|
||||
@register.simple_tag
|
||||
def get_version():
|
||||
if os.path.isdir("%s/.hg" % settings.MAILNG_DIR):
|
||||
if os.path.isdir("%s/.hg" % settings.MODOBOA_DIR):
|
||||
version = "dev-"
|
||||
code, output = exec_cmd("hg id -i", cwd=settings.MAILNG_DIR)
|
||||
code, output = exec_cmd("hg id -i", cwd=settings.MODOBOA_DIR)
|
||||
version += output.rstrip()
|
||||
return version
|
||||
elif os.path.exists("%s/VERSION" % settings.MAILNG_DIR):
|
||||
code, output = exec_cmd("cat %s/VERSION" % settings.MAILNG_DIR)
|
||||
elif os.path.exists("%s/VERSION" % settings.MODOBOA_DIR):
|
||||
code, output = exec_cmd("cat %s/VERSION" % settings.MODOBOA_DIR)
|
||||
return output.rstrip()
|
||||
else:
|
||||
return "Unknown"
|
||||
|
||||
Reference in New Issue
Block a user