summaryrefslogtreecommitdiffstats
path: root/Lib/packmail.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-08-01 11:34:53 (GMT)
committerGuido van Rossum <guido@python.org>1994-08-01 11:34:53 (GMT)
commitb6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af (patch)
tree9362939305b2d088b8f19a530c9015d886bc2801 /Lib/packmail.py
parent2979b01ff88ac4c5b316d9bf98edbaaaffac8e24 (diff)
downloadcpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.zip
cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.gz
cpython-b6775db241f5fe5e3dc2ca09fc6c9e6164d4b2af.tar.bz2
Merge alpha100 branch back to main trunk
Diffstat (limited to 'Lib/packmail.py')
-rw-r--r--Lib/packmail.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/Lib/packmail.py b/Lib/packmail.py
index d612c88..13b1bdc 100644
--- a/Lib/packmail.py
+++ b/Lib/packmail.py
@@ -41,12 +41,28 @@ def packsome(outfp, dirname, names):
# Pack all files from a directory
def packall(outfp, dirname):
names = os.listdir(dirname)
+ try:
+ names.remove('.')
+ except:
+ pass
+ try:
+ names.remove('..')
+ except:
+ pass
names.sort()
packsome(outfp, dirname, names)
# Pack all files from a directory that are not older than a give one
def packnotolder(outfp, dirname, oldest):
names = os.listdir(dirname)
+ try:
+ names.remove('.')
+ except:
+ pass
+ try:
+ names.remove('..')
+ except:
+ pass
oldest = os.path.join(dirname, oldest)
st = os.stat(oldest)
mtime = st[ST_MTIME]
@@ -67,6 +83,14 @@ def packtree(outfp, dirname):
print 'packtree', dirname
outfp.write('mkdir ' + unixfix(dirname) + '\n')
names = os.listdir(dirname)
+ try:
+ names.remove('.')
+ except:
+ pass
+ try:
+ names.remove('..')
+ except:
+ pass
subdirs = []
for name in names:
fullname = os.path.join(dirname, name)