FreeBSD support (thanks to Romain Garbage)
This commit is contained in:
parent
fa37ef38e3
commit
c6854cbfa3
2 changed files with 5 additions and 1 deletions
3
AUTHORS
3
AUTHORS
|
|
@ -55,6 +55,9 @@ Erwan Jahier <Erwan.Jahier@imag.fr>
|
||||||
Laurent Dufréchou <laurent.dufrechou@gmail.com>
|
Laurent Dufréchou <laurent.dufrechou@gmail.com>
|
||||||
* Windows support.
|
* Windows support.
|
||||||
|
|
||||||
|
Romain Garbage <romain.garbage@gmail.com>
|
||||||
|
* Fixes for FreeBSD.
|
||||||
|
|
||||||
Philippe Fremy <phil@freehackers.org>
|
Philippe Fremy <phil@freehackers.org>
|
||||||
* Fixes for Windows.
|
* Fixes for Windows.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ from __future__ import with_statement
|
||||||
import stat
|
import stat
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import re
|
||||||
from ConfigParser import RawConfigParser, DuplicateSectionError
|
from ConfigParser import RawConfigParser, DuplicateSectionError
|
||||||
from logging import warning
|
from logging import warning
|
||||||
|
|
||||||
|
|
@ -40,7 +41,7 @@ class BackendsConfig(object):
|
||||||
try:
|
try:
|
||||||
mode = os.stat(confpath).st_mode
|
mode = os.stat(confpath).st_mode
|
||||||
except OSError:
|
except OSError:
|
||||||
if sys.platform == 'win32':
|
if re.match('^(win32|freebsd[0-9]*)$', sys.platform):
|
||||||
fptr = open(confpath,'w')
|
fptr = open(confpath,'w')
|
||||||
fptr.close()
|
fptr.close()
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue