Changeset 486:b13b67c8da16
- Timestamp:
- 09/08/08 16:28:41
(4 months ago)
- Author:
- Brian Warner <warner@allmydata.com>
- branch:
- default
- Message:
xfer-client.py: use expanduser() on --furlfile
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r485 |
r486 |
|
| 1 | 1 | 2008-09-08 Brian Warner <warner@lothar.com> |
|---|
| | 2 | |
|---|
| | 3 | * doc/listings/xfer-client.py: use os.path.expanduser() on the |
|---|
| | 4 | filenames passed in by the user, to enable things like |
|---|
| | 5 | --furlfile ~/.upload.furl |
|---|
| 2 | 6 | |
|---|
| 3 | 7 | * foolscap/_version.py: bump revision to 0.3.1+ while between releases |
|---|
| r340 |
r486 |
|
| 47 | 47 | furl = opts["furl"] |
|---|
| 48 | 48 | else: |
|---|
| 49 | | furl = open(opts["furlfile"], "r").read().strip() |
|---|
| | 49 | furl = open(os.path.expanduser(opts["furlfile"]), "r").read().strip() |
|---|
| 50 | 50 | remotename = os.path.basename(opts["localfile"]) |
|---|
| 51 | 51 | d = tub.getReference(furl) |
|---|
| 52 | 52 | def _push(rref): |
|---|
| 53 | | data = open(opts["localfile"], "r").read() |
|---|
| | 53 | data = open(os.path.expanduser(opts["localfile"]), "r").read() |
|---|
| 54 | 54 | return rref.callRemote("putfile", remotename, data) |
|---|
| 55 | 55 | d.addCallback(_push) |
|---|