View | Details | Raw Unified | Return to bug 194125
Collapse All | Expand All

(-)b/devel/py-configobj/Makefile (-5 / +5 lines)
Lines 3-21 Link Here
3
3
4
PORTNAME=	configobj
4
PORTNAME=	configobj
5
PORTVERSION=	4.7.2
5
PORTVERSION=	4.7.2
6
PORTREVISION=	1
6
CATEGORIES=	devel python
7
CATEGORIES=	devel python
7
MASTER_SITES=	http://www.voidspace.org.uk/downloads/ \
8
MASTER_SITES=	http://www.voidspace.org.uk/downloads/ \
8
		SF \
9
		SF \
9
		${MASTER_SITE_GOOGLE_CODE}
10
		${MASTER_SITE_GOOGLE_CODE}
10
11
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
11
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
12
12
13
MAINTAINER=	nivit@FreeBSD.org
13
MAINTAINER=	nivit@FreeBSD.org
14
COMMENT=	Simple but powerful config file reader and writer
14
COMMENT=	Simple but powerful config file reader and writer
15
15
16
USES=		zip
16
LICENSE=	BSD3CLAUSE
17
USE_PYTHON=	yes
17
18
USE_PYDISTUTILS=	yes
18
USES=		python zip
19
PYDISTUTILS_AUTOPLIST=	yes
19
USE_PYTHON=	distutils autoplist
20
20
21
.include <bsd.port.mk>
21
.include <bsd.port.mk>
(-)b/devel/py-configobj/files/patch-configobj.py (+43 lines)
Added Link Here
1
--- configobj.py.orig	2010-02-27 21:36:16 UTC
2
+++ configobj.py
3
@@ -1641,7 +1641,7 @@
4
                             comment = ''
5
                             try:
6
                                 value = unrepr(value)
7
-                            except Exception, e:
8
+                            except Exception as e:
9
                                 if type(e) == UnknownType:
10
                                     msg = 'Unknown name or type in value at line %s.'
11
                                 else:
12
@@ -1654,7 +1654,7 @@
13
                         comment = ''
14
                         try:
15
                             value = unrepr(value)
16
-                        except Exception, e:
17
+                        except Exception as e:
18
                             if isinstance(e, UnknownType):
19
                                 msg = 'Unknown name or type in value at line %s.'
20
                             else:
21
@@ -1929,11 +1929,11 @@
22
                                        raise_errors=True,
23
                                        file_error=True,
24
                                        _inspec=True)
25
-            except ConfigObjError, e:
26
+            except ConfigObjError as e:
27
                 # FIXME: Should these errors have a reference
28
                 #        to the already parsed ConfigObj ?
29
                 raise ConfigspecError('Parsing configspec failed: %s' % e)
30
-            except IOError, e:
31
+            except IOError as e:
32
                 raise IOError('Reading configspec failed: %s' % e)
33
         
34
         self.configspec = configspec
35
@@ -2189,7 +2189,7 @@
36
                                         val,
37
                                         missing=missing
38
                                         )
39
-            except validator.baseErrorClass, e:
40
+            except validator.baseErrorClass as e:
41
                 if not preserve_errors or isinstance(e, self._vdtMissingValue):
42
                     out[entry] = False
43
                 else:
(-)b/devel/py-configobj/files/patch-validate.py (+38 lines)
Added Link Here
1
--- validate.py.orig	2010-03-01 23:04:02 UTC
2
+++ validate.py
3
@@ -284,7 +284,7 @@
4
     except socket.error:
5
         # bug in inet_aton, corrected in Python 2.4
6
         if ip.strip() == '255.255.255.255':
7
-            return 0xFFFFFFFFL
8
+            return 0xFFFFFFFF
9
         else:
10
             raise ValueError('Not a good dotted-quad IP: %s' % ip)
11
     return
12
@@ -316,7 +316,7 @@
13
     import socket, struct
14
     
15
     # no need to intercept here, 4294967295L is fine
16
-    if num > 4294967295L or num < 0:
17
+    if num > 4294967295 or num < 0:
18
         raise ValueError('Not a good numeric IP: %s' % num)
19
     try:
20
         return socket.inet_ntoa(
21
@@ -739,7 +739,7 @@
22
         elif isinstance(val, (int, long, float, basestring)):
23
             try:
24
                 out_params.append(fun(val))
25
-            except ValueError, e:
26
+            except ValueError as e:
27
                 raise VdtParamError(name, val)
28
         else:
29
             raise VdtParamError(name, val)
30
@@ -1292,7 +1292,7 @@
31
         raise VdtValueTooLongError(value)
32
     try:
33
         return [fun_dict[arg](val) for arg, val in zip(args, value)]
34
-    except KeyError, e:
35
+    except KeyError as e:
36
         raise VdtParamError('mixed_list', e)
37
 
38
 
(-)b/devel/py-configobj/pkg-descr (-1 / +1 lines)
Lines 2-5 ConfigObj is a simple but powerful config file reader and writer: an ini file Link Here
2
round tripper. Its main feature is that it is very easy to use, with a
2
round tripper. Its main feature is that it is very easy to use, with a
3
straightforward programmer's interface and a simple syntax for config file 
3
straightforward programmer's interface and a simple syntax for config file 
4
4
5
WWW:	http://www.voidspace.org.uk/python/configobj.html
5
WWW: http://www.voidspace.org.uk/python/configobj.html

Return to bug 194125