docutil/docsvg.py
changeset 3890 6d2d37975c7c
parent 3818 e528b11a60cc
child 3901 b8b3573475e7
equal deleted inserted replaced
3889:e9ad68178d36 3890:6d2d37975c7c
    74 
    74 
    75 def _get_inkscape_version():
    75 def _get_inkscape_version():
    76     inkpath = get_inkscape_path()
    76     inkpath = get_inkscape_path()
    77     if inkpath is None:
    77     if inkpath is None:
    78         return None
    78         return None
    79     return list(map(int, 
    79     version_string = subprocess.check_output(
    80         subprocess.check_output([inkpath,"--version"]).split()[1].split(b'.')))
    80             [inkpath,"--version"], 
       
    81             stderr=subprocess.STDOUT)
       
    82     if version_string:
       
    83         return list(map(int,version_string.split()[1].split(b'.')))
       
    84     return [0,0]
    81 
    85 
    82 _inkscape_version = None
    86 _inkscape_version = None
    83 def get_inkscape_version():
    87 def get_inkscape_version():
    84     global _inkscape_version
    88     global _inkscape_version
    85 
    89