[Debtorrent-commits] r35 - in /debtorrent/trunk/DebTorrent: BT1/makemetafile.py download_bt1.py

camrdale-guest at users.alioth.debian.org camrdale-guest at users.alioth.debian.org
Fri May 4 07:32:24 UTC 2007


Author: camrdale-guest
Date: Fri May  4 07:32:24 2007
New Revision: 35

URL: http://svn.debian.org/wsvn/debtorrent/?sc=1&rev=35
Log:
Add dt_ to directory names to avoid conflicts with the Packages file

Modified:
    debtorrent/trunk/DebTorrent/BT1/makemetafile.py
    debtorrent/trunk/DebTorrent/download_bt1.py

Modified: debtorrent/trunk/DebTorrent/BT1/makemetafile.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/BT1/makemetafile.py?rev=35&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/BT1/makemetafile.py (original)
+++ debtorrent/trunk/DebTorrent/BT1/makemetafile.py Fri May  4 07:32:24 2007
@@ -122,7 +122,7 @@
     check_info(info)
     h = open(f, 'wb')
     data = {'info': info, 'announce': strip(url), 
-        'name': uniconvert(split(file)[1], encoding),
+        'name': uniconvert("dt_" + split(file)[1], encoding),
         'creation date': long(time())}
     
     if params.has_key('comment') and params['comment']:

Modified: debtorrent/trunk/DebTorrent/download_bt1.py
URL: http://svn.debian.org/wsvn/debtorrent/debtorrent/trunk/DebTorrent/download_bt1.py?rev=35&op=diff
==============================================================================
--- debtorrent/trunk/DebTorrent/download_bt1.py (original)
+++ debtorrent/trunk/DebTorrent/download_bt1.py Fri May  4 07:32:24 2007
@@ -347,7 +347,7 @@
 
     try:
         if file:
-            name = split(file)[1]
+            name = "dt_" + split(file)[1]
             h = open(file, 'r')
             try:
                 for line in h:   # quick test to see if packages file is correct
@@ -367,14 +367,14 @@
                 h = open(file, 'r')
         else:
             urlp = urlparse(url)
-            name = urlp[1] + urlp[2].replace('/','_')
+            name = "dt_" + urlp[1] + urlp[2].replace('/','_')
             try:
                 h = urlopen(url)
                 file = url
                 data = h.read()
                 assert len(data) > 8
                 if url[-3:] == ".gz":
-                    name = urlp[1] + urlp[2][:-3].replace('/','_')
+                    name = "dt_" + urlp[1] + urlp[2][:-3].replace('/','_')
                     if data[:8] != "Package:":
                         compressed = StringIO(data)
                         f = GzipFile(fileobj = compressed)




More information about the Debtorrent-commits mailing list