[csw-devel] SF.net SVN: gar:[20892] csw/mgar/gar/v2/lib/python/generate_catalog_file.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Apr 28 20:23:03 CEST 2013
Revision: 20892
http://gar.svn.sourceforge.net/gar/?rev=20892&view=rev
Author: wahwah
Date: 2013-04-28 18:23:02 +0000 (Sun, 28 Apr 2013)
Log Message:
-----------
generate-catalog-file: Do not hardcode cache path
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/generate_catalog_file.py
Modified: csw/mgar/gar/v2/lib/python/generate_catalog_file.py
===================================================================
--- csw/mgar/gar/v2/lib/python/generate_catalog_file.py 2013-04-28 18:22:53 UTC (rev 20891)
+++ csw/mgar/gar/v2/lib/python/generate_catalog_file.py 2013-04-28 18:23:02 UTC (rev 20892)
@@ -25,6 +25,7 @@
import os
import optparse
import logging
+import sys
class Error(Exception):
@@ -37,7 +38,8 @@
self.catrel = catrel
self.arch = arch
self.osrel = osrel
- self.pkgcache = pkgcache or rest.CachedPkgstats("/home/web/pkgstats")
+ home_dir = os.environ['HOME']
+ self.pkgcache = pkgcache or rest.CachedPkgstats(os.path.join(home_dir, "pkgstats"))
self.rest_client = rest_client or rest.RestClient()
self._catalog = None
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list