mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
Few bugfixes.
This commit is contained in:
@@ -288,7 +288,8 @@ ul.visible {
|
||||
"text-align" : "center",
|
||||
"height" : "25px",
|
||||
"border" : "1px solid #333",
|
||||
"background" : "white"})
|
||||
"background" : "white",
|
||||
"z-index" : 3})
|
||||
.setStyles(item.getPosition())
|
||||
.inject(document.body);
|
||||
block.set("html", "Moving " + selectedRows.length + " messages");
|
||||
|
||||
+2
-2
@@ -8,10 +8,10 @@ from django.template.loader import render_to_string
|
||||
from django.utils.translation import ugettext as _
|
||||
from mailng.lib import parameters
|
||||
|
||||
def exec_cmd(cmd):
|
||||
def exec_cmd(cmd, **kwargs):
|
||||
import subprocess
|
||||
|
||||
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
|
||||
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, **kwargs)
|
||||
output = p.communicate()[0]
|
||||
return p.returncode, output
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
from django.conf import settings
|
||||
from django import template
|
||||
from mailng.lib import exec_cmd
|
||||
|
||||
@@ -6,13 +7,13 @@ register = template.Library()
|
||||
|
||||
@register.simple_tag
|
||||
def get_version():
|
||||
if os.path.isdir(".hg"):
|
||||
if os.path.isdir("%s/.hg" % settings.MAILNG_DIR):
|
||||
version = "dev-"
|
||||
code, output = exec_cmd("hg id -i")
|
||||
code, output = exec_cmd("hg id -i", cwd=settings.MAILNG_DIR)
|
||||
version += output.rstrip()
|
||||
return version
|
||||
elif os.path.exists("VERSION"):
|
||||
code, output = exec_cmd("cat VERSION")
|
||||
elif os.path.exists("%s/VERSION" % settings.MAILNG_DIR):
|
||||
code, output = exec_cmd("cat %s/VERSION" % settings.MAILNG_DIR)
|
||||
return output.rstrip()
|
||||
else:
|
||||
return "Unknown"
|
||||
|
||||
Reference in New Issue
Block a user