beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From al...@apache.org
Subject [beam] branch master updated: Fix traceback.format_exc(e) call
Date Wed, 02 Oct 2019 20:49:43 GMT
This is an automated email from the ASF dual-hosted git repository.

altay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new f207721  Fix traceback.format_exc(e) call
     new 8589c85  Merge pull request #9689 from Pehat/patch-2
f207721 is described below

commit f207721b1188490b9d227edabafdd8e6511c652d
Author: Renat Nasyrov <renat-nasyrov@yandex.ru>
AuthorDate: Mon Sep 30 11:25:46 2019 +0200

    Fix traceback.format_exc(e) call
    
    As of https://docs.python.org/2/library/traceback.html#traceback.format_exc , format_exc()
accepts an integer for traceback depth limit, not the traceback itself. This PR fixes an incorrect
call.
---
 sdks/python/apache_beam/io/vcfio.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sdks/python/apache_beam/io/vcfio.py b/sdks/python/apache_beam/io/vcfio.py
index 9f13b8b..2a13bf8 100644
--- a/sdks/python/apache_beam/io/vcfio.py
+++ b/sdks/python/apache_beam/io/vcfio.py
@@ -308,13 +308,13 @@ class _VcfSource(filebasedsource.FileBasedSource):
                                                   range_tracker)
       try:
         self._vcf_reader = vcf.Reader(fsock=self._create_generator())
-      except SyntaxError as e:
+      except SyntaxError:
         # Throw the exception inside the generator to ensure file is properly
         # closed (it's opened inside TextSource.read_records).
         self._text_lines.throw(
             ValueError('An exception was raised when reading header from VCF '
                        'file %s: %s' % (self._file_name,
-                                        traceback.format_exc(e))))
+                                        traceback.format_exc())))
 
     def _store_header_lines(self, header_lines):
       self._header_lines = header_lines


Mime
View raw message