Skip to content

Commit

Permalink
Clean up imports
Browse files Browse the repository at this point in the history
Remove unused and function-scoped imports
  • Loading branch information
stefanor committed Nov 7, 2015
1 parent 678131d commit 0ed02c1
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions dvsource-v4l2-other.py
Expand Up @@ -9,12 +9,9 @@
"""

import argparse
import atexit
import os
import tempfile
import time
import subprocess
import shutil

subprocess.DEVNULL = file(os.devnull, "rw+")

Expand Down Expand Up @@ -104,14 +101,12 @@ def parse_dvswitchrc(configfile):


def get_dvswitchrc():
import shlex
from os import path
configs = [path.expanduser("~"), ".", "/etc"]
configs = [os.path.expanduser("~"), ".", "/etc"]

actual_config = {}
for dirname in configs:
configfile = path.join(dirname, ".dvswitchrc")
if path.exists(configfile):
configfile = os.path.join(dirname, ".dvswitchrc")
if os.path.exists(configfile):
actual_config.update(parse_dvswitchrc(configfile))

if actual_config.get("MIXER_HOST", None) == "0.0.0.0":
Expand Down

0 comments on commit 0ed02c1

Please sign in to comment.