From c6854cbfa36d8e71dc5893462def70e78e8d0ebb Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Tue, 26 Apr 2011 08:17:38 +0200 Subject: [PATCH] FreeBSD support (thanks to Romain Garbage) --- AUTHORS | 3 +++ weboob/core/backendscfg.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 924446c9..47a035ef 100644 --- a/AUTHORS +++ b/AUTHORS @@ -55,6 +55,9 @@ Erwan Jahier Laurent Dufréchou * Windows support. +Romain Garbage + * Fixes for FreeBSD. + Philippe Fremy * Fixes for Windows. diff --git a/weboob/core/backendscfg.py b/weboob/core/backendscfg.py index 4e585b12..c35f3fd2 100644 --- a/weboob/core/backendscfg.py +++ b/weboob/core/backendscfg.py @@ -23,6 +23,7 @@ from __future__ import with_statement import stat import os import sys +import re from ConfigParser import RawConfigParser, DuplicateSectionError from logging import warning @@ -40,7 +41,7 @@ class BackendsConfig(object): try: mode = os.stat(confpath).st_mode except OSError: - if sys.platform == 'win32': + if re.match('^(win32|freebsd[0-9]*)$', sys.platform): fptr = open(confpath,'w') fptr.close() else: