Skip to content

Commit

Permalink
Simple fix to remove a Python version dependency. Suppress only works…
Browse files Browse the repository at this point in the history
… with python 3.4 or later.
  • Loading branch information
biomadeira committed Sep 6, 2017
1 parent b5a8878 commit da94f07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions prointvar/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import time
import json
import copy
import shutil
import logging
import requests
import numpy as np
Expand All @@ -25,7 +26,6 @@
from string import ascii_lowercase
from string import ascii_uppercase
from datetime import datetime
from contextlib import suppress
from collections import OrderedDict

from Bio import pairwise2
Expand Down Expand Up @@ -92,8 +92,8 @@ def create_directory(directory):


def lazy_file_remover(filename):
with suppress(FileNotFoundError):
os.remove(filename)
if os.path.exists(filename):
shutil.rmtree(filename)


def flash(message):
Expand Down

0 comments on commit da94f07

Please sign in to comment.