Skip to content

Commit e5d0832

Browse files
committed
fix cli arguments passed as unicode
1 parent d1bdde8 commit e5d0832

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ script:
2727
- python setup.py test
2828
- find . -type f -name "*.py" | xargs flake8
2929
- python setup.py --long-description | rst2html5.py
30+
- pynumeric export -f pynumeric/tests/201611212330:PRECIPET,125,18,MPRATE_QPE,PRECIPET_QC_PARAMETERS_CMC:PRECIPET_NUMERIC_MMHR_WHK -o /tmp/test-output.tif -of GTiff
3031

3132
after_success:
3233
- coverage run --source=pynumeric -m unittest pynumeric.tests.run_tests

pynumeric/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ def to_grid(self, filename='out.tif', fmt='GTiff'):
165165
maxy = ((self.metadata['LatCentre'] + resy * (height / 2)) -
166166
(resy / 2))
167167

168-
dsource = gdal.GetDriverByName(fmt).Create(filename, width, height,
169-
1, gdal.GDT_Float64)
168+
dsource = gdal.GetDriverByName(str(fmt)).Create(filename, width,
169+
height, 1,
170+
gdal.GDT_Float64)
170171

171172
dsource.SetProjection(srs.ExportToWkt())
172173

0 commit comments

Comments
 (0)