File: define_filenotfounderror_python2.patch

package info (click to toggle)
python-pybedtools 0.10.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,624 kB
  • sloc: python: 10,030; cpp: 899; makefile: 128; sh: 57
file content (21 lines) | stat: -rw-r--r-- 512 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Author: Liubov Chuprikova <chuprikovalv@gmail.com>
Last-Update: Wed, 13 July 2018 11:36:44 +0300
Description: Define FileNotFoundError as OSError for python 2


--- a/pybedtools/contrib/bigwig.py
+++ b/pybedtools/contrib/bigwig.py
@@ -6,6 +6,13 @@ import os
 import subprocess
 
 
+try:
+    FileNotFoundError
+except NameError:
+    # python2
+    FileNotFoundError = OSError
+
+
 def mapped_read_count(bam, force=False):
     """
     Scale is cached in a bam.scale file containing the number of mapped reads.