Skip to content

Commit

Permalink
Do not fail if the package is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
sbraz committed Feb 21, 2018
1 parent f0de182 commit f2fc2c5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pymediainfo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import locale
import json
import sys
from pkg_resources import get_distribution
from pkg_resources import get_distribution, DistributionNotFound
import xml.etree.ElementTree as ET
from ctypes import *

Expand All @@ -17,7 +17,10 @@
else:
import urllib.parse as urlparse

__version__ = get_distribution("pymediainfo").version
try:
__version__ = get_distribution("pymediainfo").version
except DistributionNotFound:
pass

class Track(object):
"""
Expand Down

0 comments on commit f2fc2c5

Please sign in to comment.