From e19bf33f516e890ac370875d78c9fcbb62d98abc Mon Sep 17 00:00:00 2001 From: James Date: Mon, 18 Jul 2011 17:04:46 -0400 Subject: [PATCH 1/5] temp comit --- install/airtime-install | 3 +++ install/airtime-uninstall | 3 +++ python_apps/media-monitor/airtime-media-monitor | 5 +++++ python_apps/pypo/airtime-liquidsoap | 4 ++++ python_apps/pypo/airtime-playout | 3 +++ python_apps/show-recorder/airtime-show-recorder | 3 +++ utils/airtime-import/airtime-import | 4 +++- utils/airtime-import/airtime-import.py | 2 +- 8 files changed, 25 insertions(+), 2 deletions(-) diff --git a/install/airtime-install b/install/airtime-install index f746e22b5..ce6224436 100755 --- a/install/airtime-install +++ b/install/airtime-install @@ -1,5 +1,8 @@ #!/bin/bash +virtualenv_bin="/home/james/temp/bin/" +. ${virtualenv_bin}activate + #Cause bash script to exit if any of the installers #return with a non-zero return value. set -e diff --git a/install/airtime-uninstall b/install/airtime-uninstall index 9f708e10f..5bdc51d9f 100755 --- a/install/airtime-uninstall +++ b/install/airtime-uninstall @@ -1,5 +1,8 @@ #!/bin/bash +virtualenv_bin="/home/james/temp/bin/" +. ${virtualenv_bin}activate + #Cause bash script to exit if any of the installers #return with a non-zero return value. set -e diff --git a/python_apps/media-monitor/airtime-media-monitor b/python_apps/media-monitor/airtime-media-monitor index c6f892fdf..8fbf6bf71 100755 --- a/python_apps/media-monitor/airtime-media-monitor +++ b/python_apps/media-monitor/airtime-media-monitor @@ -1,10 +1,15 @@ #!/bin/sh # Location of pypo_cli.py Python script + +virtualenv_bin="/home/james/temp/bin/" +. ${virtualenv_bin}activate + media_monitor_path="/usr/lib/airtime/media-monitor/" media_monitor_script="MediaMonitor.py" api_client_path="/usr/lib/airtime/pypo/" + cd ${media_monitor_path} exec 2>&1 diff --git a/python_apps/pypo/airtime-liquidsoap b/python_apps/pypo/airtime-liquidsoap index d7fd805f7..dd30f42e6 100755 --- a/python_apps/pypo/airtime-liquidsoap +++ b/python_apps/pypo/airtime-liquidsoap @@ -1,4 +1,8 @@ #!/bin/sh + +virtualenv_bin="/home/james/temp/bin/" +. ${virtualenv_bin}activate + ls_user="pypo" export HOME="/var/tmp/airtime/pypo/" api_client_path="/usr/lib/airtime/pypo/" diff --git a/python_apps/pypo/airtime-playout b/python_apps/pypo/airtime-playout index 0eb206f1c..22a35f620 100755 --- a/python_apps/pypo/airtime-playout +++ b/python_apps/pypo/airtime-playout @@ -1,5 +1,8 @@ #!/bin/sh +virtualenv_bin="/home/james/temp/bin/" +. ${virtualenv_bin}activate + pypo_user="pypo" # Location of pypo_cli.py Python script diff --git a/python_apps/show-recorder/airtime-show-recorder b/python_apps/show-recorder/airtime-show-recorder index 0bd0562e6..09ee88c49 100755 --- a/python_apps/show-recorder/airtime-show-recorder +++ b/python_apps/show-recorder/airtime-show-recorder @@ -1,5 +1,8 @@ #!/bin/sh +virtualenv_bin="/home/james/temp/bin/" +. ${virtualenv_bin}activate + recorder_user="pypo" diff --git a/utils/airtime-import/airtime-import b/utils/airtime-import/airtime-import index e18781929..1466fc6f1 100755 --- a/utils/airtime-import/airtime-import +++ b/utils/airtime-import/airtime-import @@ -1,6 +1,8 @@ #!/bin/sh -# Location of pypo_cli.py Python script +virtualenv_bin="/home/james/temp/bin/" +. ${virtualenv_bin}activate + airtime_import_path="/usr/lib/airtime/utils/airtime-import/" airtime_import_script="airtime-import.py" diff --git a/utils/airtime-import/airtime-import.py b/utils/airtime-import/airtime-import.py index c5b29036c..7ea4ae7fc 100644 --- a/utils/airtime-import/airtime-import.py +++ b/utils/airtime-import/airtime-import.py @@ -195,7 +195,7 @@ def StorageSetAction(option, opt, value, parser): parser.rargs.remove('--force') if(not bypass): errorIfMultipleOption(parser.rargs, "Only [-f] and [--force] option is allowed with this option.") - possibleInput = {'y','Y','n','N'} + possibleInput = ['y','Y','n','N'] confirm = raw_input("Are you sure you want to change the storage direcory? (y/N)") confirm = confirm or 'N' while(confirm not in possibleInput): From 9aa7b7f4033b02e689581ccefee8ae5d3a37880f Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 19 Jul 2011 18:36:10 +0200 Subject: [PATCH 2/5] CC-2572 : Set Proper Metadata for a recorded show --- .../application/controllers/ApiController.php | 63 ++++++++++--------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 96f8e31b1..310f3c4ed 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -74,8 +74,8 @@ class ApiController extends Zend_Controller_Action $download = ("true" == $this->_getParam('download')); $logger = Logging::getLogger(); - - if(!in_array($api_key, $CC_CONFIG["apiKey"]) && + + if(!in_array($api_key, $CC_CONFIG["apiKey"]) && is_null(Zend_Auth::getInstance()->getStorage()->read())) { header('HTTP/1.0 401 Unauthorized'); @@ -120,7 +120,7 @@ class ApiController extends Zend_Controller_Action fclose($fp); //make sure to exit here so that no other output is sent. - exit; + exit; } else { $logger->err('Resource in database, but not in storage: "'.$filepath.'"'); } @@ -336,12 +336,12 @@ class ApiController extends Zend_Controller_Action $this->view->fileid = $file_id; $this->view->showinstanceid = $show_instance_id; - + $showCanceled = false; $file = StoredFile::Recall($file_id); //$show_instance = $this->_getParam('show_instance'); - $show_name = ""; + $show_name = null; try { $show_inst = new ShowInstance($show_instance_id); @@ -359,10 +359,17 @@ class ApiController extends Zend_Controller_Action $showCanceled = true; } - $tmpTitle = !(empty($show_name))?$show_name."-":""; - $tmpTitle .= $file->getName(); + if (isset($show_name)) { + $tmpTitle = "$show_name-$show_start_time"; + $tmpTitle = str_replace(":", "-", $tmpTitle); + $tmpTitle = str_replace(" ", "-", $tmpTitle); + } + else { + $tmpTitle = $file->getName(); + } $file->setMetadataValue('MDATA_KEY_TITLE', $tmpTitle); + $file->setMetadataValue('MDATA_KEY_CREATOR', "Airtime Show Recorder"); if (!$showCanceled && Application_Model_Preference::GetDoSoundCloudUpload()) { @@ -392,7 +399,7 @@ class ApiController extends Zend_Controller_Action } $this->view->id = $file_id; - + } public function mediaMonitorSetupAction() { @@ -409,7 +416,7 @@ class ApiController extends Zend_Controller_Action print 'You are not allowed to access this resource.'; exit; } - + $this->view->stor = MusicDir::getStorDir()->getDirectory(); } @@ -439,7 +446,7 @@ class ApiController extends Zend_Controller_Action if ($mode == "create") { $filepath = $md['MDATA_KEY_FILEPATH']; $file = StoredFile::RecallByFilepath($filepath); - + if (is_null($file)) { $file = StoredFile::Insert($md); } else { @@ -447,7 +454,7 @@ class ApiController extends Zend_Controller_Action return; } - + //Martin Konecny July 14th, 2011: The following commented out code is the way //we used to check for duplicates (by md5). Why are we checking by md5 and //not by filepath? @@ -509,7 +516,7 @@ class ApiController extends Zend_Controller_Action $this->view->id = $file->getId(); } - + public function listAllFilesAction() { global $CC_CONFIG; @@ -522,10 +529,10 @@ class ApiController extends Zend_Controller_Action exit; } $dir_id = $request->getParam('dir_id'); - + $this->view->files = StoredFile::listAllFiles($dir_id); } - + public function listAllWatchedDirsAction() { global $CC_CONFIG; @@ -537,69 +544,69 @@ class ApiController extends Zend_Controller_Action print 'You are not allowed to access this resource.'; exit; } - + $result = array(); - + $arrWatchedDirs = MusicDir::getWatchedDirs(); $storDir = MusicDir::getStorDir(); - + $result[$storDir->getId()] = $storDir->getDirectory(); - + foreach ($arrWatchedDirs as $watchedDir){ $result[$watchedDir->getId()] = $watchedDir->getDirectory(); } - + $this->view->dirs = $result; } - + public function addWatchedDirAction() { global $CC_CONFIG; $request = $this->getRequest(); $api_key = $request->getParam('api_key'); $path = base64_decode($request->getParam('path')); - + if (!in_array($api_key, $CC_CONFIG["apiKey"])) { header('HTTP/1.0 401 Unauthorized'); print 'You are not allowed to access this resource.'; exit; } - + $this->view->msg = MusicDir::addWatchedDir($path); } - + public function removeWatchedDirAction() { global $CC_CONFIG; $request = $this->getRequest(); $api_key = $request->getParam('api_key'); $path = base64_decode($request->getParam('path')); - + if (!in_array($api_key, $CC_CONFIG["apiKey"])) { header('HTTP/1.0 401 Unauthorized'); print 'You are not allowed to access this resource.'; exit; } - + $this->view->msg = MusicDir::removeWatchedDir($path); } - + public function setStorageDirAction() { global $CC_CONFIG; $request = $this->getRequest(); $api_key = $request->getParam('api_key'); $path = base64_decode($request->getParam('path')); - + if (!in_array($api_key, $CC_CONFIG["apiKey"])) { header('HTTP/1.0 401 Unauthorized'); print 'You are not allowed to access this resource.'; exit; } - + $this->view->msg = MusicDir::setStorDir($path); } } From 7d79fa7b632df49c765c48b83c32701e43d6ec46 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 19 Jul 2011 19:02:23 +0200 Subject: [PATCH 3/5] CC-2572 : Set Proper Metadata for a recorded show --- airtime_mvc/application/controllers/ApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/application/controllers/ApiController.php b/airtime_mvc/application/controllers/ApiController.php index 310f3c4ed..112fdf575 100644 --- a/airtime_mvc/application/controllers/ApiController.php +++ b/airtime_mvc/application/controllers/ApiController.php @@ -361,7 +361,6 @@ class ApiController extends Zend_Controller_Action if (isset($show_name)) { $tmpTitle = "$show_name-$show_start_time"; - $tmpTitle = str_replace(":", "-", $tmpTitle); $tmpTitle = str_replace(" ", "-", $tmpTitle); } else { @@ -370,6 +369,7 @@ class ApiController extends Zend_Controller_Action $file->setMetadataValue('MDATA_KEY_TITLE', $tmpTitle); $file->setMetadataValue('MDATA_KEY_CREATOR', "Airtime Show Recorder"); + $file->setMetadataValue('MDATA_KEY_TRACKNUMBER', null); if (!$showCanceled && Application_Model_Preference::GetDoSoundCloudUpload()) { From b4e887eb2d6384874beca7db01a4902d6ef73da5 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 19 Jul 2011 15:06:35 -0400 Subject: [PATCH 4/5] temp comit --- install/airtime-install | 2 +- install/airtime-uninstall | 3 +-- python_apps/media-monitor/airtime-media-monitor | 2 +- python_apps/pypo/airtime-liquidsoap | 2 +- python_apps/pypo/airtime-playout | 2 +- python_apps/show-recorder/airtime-show-recorder | 2 +- utils/airtime-import/airtime-import | 2 +- utils/airtime-update-db-settings | 3 +++ 8 files changed, 10 insertions(+), 8 deletions(-) diff --git a/install/airtime-install b/install/airtime-install index ce6224436..452b87e88 100755 --- a/install/airtime-install +++ b/install/airtime-install @@ -1,6 +1,6 @@ #!/bin/bash -virtualenv_bin="/home/james/temp/bin/" +virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" . ${virtualenv_bin}activate #Cause bash script to exit if any of the installers diff --git a/install/airtime-uninstall b/install/airtime-uninstall index 5bdc51d9f..e23884d40 100755 --- a/install/airtime-uninstall +++ b/install/airtime-uninstall @@ -1,6 +1,6 @@ #!/bin/bash -virtualenv_bin="/home/james/temp/bin/" +virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" . ${virtualenv_bin}activate #Cause bash script to exit if any of the installers @@ -28,7 +28,6 @@ python ${SCRIPTPATH}/../python_apps/remove-pypo-user.py php ${SCRIPTPATH}/include/airtime-uninstall.php - echo -e "\n****************************** Uninstall Complete ******************************\n" echo "NOTE: To fully remove all Airtime files, you will also have to manually delete" echo " the directories '/srv/airtime'(default storage location of media files)" diff --git a/python_apps/media-monitor/airtime-media-monitor b/python_apps/media-monitor/airtime-media-monitor index 8fbf6bf71..4e8b28727 100755 --- a/python_apps/media-monitor/airtime-media-monitor +++ b/python_apps/media-monitor/airtime-media-monitor @@ -2,7 +2,7 @@ # Location of pypo_cli.py Python script -virtualenv_bin="/home/james/temp/bin/" +virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" . ${virtualenv_bin}activate media_monitor_path="/usr/lib/airtime/media-monitor/" diff --git a/python_apps/pypo/airtime-liquidsoap b/python_apps/pypo/airtime-liquidsoap index dd30f42e6..a6ce96ab2 100755 --- a/python_apps/pypo/airtime-liquidsoap +++ b/python_apps/pypo/airtime-liquidsoap @@ -1,6 +1,6 @@ #!/bin/sh -virtualenv_bin="/home/james/temp/bin/" +virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" . ${virtualenv_bin}activate ls_user="pypo" diff --git a/python_apps/pypo/airtime-playout b/python_apps/pypo/airtime-playout index 22a35f620..dd19d70be 100755 --- a/python_apps/pypo/airtime-playout +++ b/python_apps/pypo/airtime-playout @@ -1,6 +1,6 @@ #!/bin/sh -virtualenv_bin="/home/james/temp/bin/" +virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" . ${virtualenv_bin}activate pypo_user="pypo" diff --git a/python_apps/show-recorder/airtime-show-recorder b/python_apps/show-recorder/airtime-show-recorder index 09ee88c49..e5eee9664 100755 --- a/python_apps/show-recorder/airtime-show-recorder +++ b/python_apps/show-recorder/airtime-show-recorder @@ -1,6 +1,6 @@ #!/bin/sh -virtualenv_bin="/home/james/temp/bin/" +virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" . ${virtualenv_bin}activate recorder_user="pypo" diff --git a/utils/airtime-import/airtime-import b/utils/airtime-import/airtime-import index 1466fc6f1..1b6d78372 100755 --- a/utils/airtime-import/airtime-import +++ b/utils/airtime-import/airtime-import @@ -1,6 +1,6 @@ #!/bin/sh -virtualenv_bin="/home/james/temp/bin/" +virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" . ${virtualenv_bin}activate airtime_import_path="/usr/lib/airtime/utils/airtime-import/" diff --git a/utils/airtime-update-db-settings b/utils/airtime-update-db-settings index 459b6b459..af255803a 100755 --- a/utils/airtime-update-db-settings +++ b/utils/airtime-update-db-settings @@ -30,6 +30,9 @@ # Determine directories, files #------------------------------------------------------------------------------- +virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/" +. ${virtualenv_bin}activate + # Absolute path to this script SCRIPT=`readlink -f $0` # Absolute directory this script is in From cef2361bc21d6bb6647e029ad0facd682f543811 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 19 Jul 2011 16:31:02 -0400 Subject: [PATCH 5/5] - removed cue_file because it's handled by liquidsoap itself. --- python_apps/pypo/logging.cfg | 8 +- python_apps/pypo/pypo-cli.py | 1 - python_apps/pypo/pypofetch.py | 1 - python_apps/pypo/pypopush.py | 1 - .../pypo/test/pypo-cue-in-validator.py | 42 --------- python_apps/pypo/util/__init__.py | 3 +- python_apps/pypo/util/cue_file.py | 88 ------------------- 7 files changed, 2 insertions(+), 142 deletions(-) delete mode 100755 python_apps/pypo/test/pypo-cue-in-validator.py delete mode 100755 python_apps/pypo/util/cue_file.py diff --git a/python_apps/pypo/logging.cfg b/python_apps/pypo/logging.cfg index 234a094f0..3699d3dbf 100644 --- a/python_apps/pypo/logging.cfg +++ b/python_apps/pypo/logging.cfg @@ -1,5 +1,5 @@ [loggers] -keys=root,fetch,push,cue_file +keys=root,fetch,push [handlers] keys=fileOutHandler @@ -23,12 +23,6 @@ handlers=fileOutHandler qualname=push propagate=0 -[logger_cue_file] -level=DEBUG -handlers=fileOutHandler -qualname=push -propagate=0 - [handler_fileOutHandler] class=logging.handlers.RotatingFileHandler level=DEBUG diff --git a/python_apps/pypo/pypo-cli.py b/python_apps/pypo/pypo-cli.py index 8ececc23d..702ad8dd4 100755 --- a/python_apps/pypo/pypo-cli.py +++ b/python_apps/pypo/pypo-cli.py @@ -56,7 +56,6 @@ except Exception, e: class Global: def __init__(self): self.api_client = api_client.api_client_factory(config) - self.cue_file = CueFile() self.set_export_source('scheduler') def selfcheck(self): diff --git a/python_apps/pypo/pypofetch.py b/python_apps/pypo/pypofetch.py index 3100a5dd0..d9d78ddea 100755 --- a/python_apps/pypo/pypofetch.py +++ b/python_apps/pypo/pypofetch.py @@ -59,7 +59,6 @@ class PypoFetch(Thread): Thread.__init__(self) logger = logging.getLogger('fetch') self.api_client = api_client.api_client_factory(config) - self.cue_file = CueFile() self.set_export_source('scheduler') self.queue = q logger.info("PypoFetch: init complete") diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index e867ebcfc..60dd4f522 100755 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -35,7 +35,6 @@ class PypoPush(Thread): def __init__(self, q): Thread.__init__(self) self.api_client = api_client.api_client_factory(config) - self.cue_file = CueFile() self.set_export_source('scheduler') self.queue = q diff --git a/python_apps/pypo/test/pypo-cue-in-validator.py b/python_apps/pypo/test/pypo-cue-in-validator.py deleted file mode 100755 index df4d06661..000000000 --- a/python_apps/pypo/test/pypo-cue-in-validator.py +++ /dev/null @@ -1,42 +0,0 @@ -import unittest - -from util.cue_file import CueFile - -from mutagen.mp3 import MP3 -from mutagen.oggvorbis import OggVorbis -import random -import string - -class test(unittest.TestCase): - - """ - - A test class for the cue_in module. - - """ - - def setUp(self): - self.cue_file = CueFile() - - def test_cue_mp3(self): - src = '../audio_samples/OpSound/Peter_Rudenko_-_Opening.mp3' - dst = '/tmp/' + "".join([random.choice(string.letters) for i in xrange(10)]) + '.mp3' - self.cue_file.cue(src, dst, 5, 5) - src_length = MP3(src).info.length - dst_length = MP3(dst).info.length - print src + " " + str(src_length) - print dst + " " + str(dst_length) - self.assertTrue(dst_length < src_length) - - def test_cue_ogg(self): - src = '../audio_samples/OpSound/ACDC_-_Back_In_Black-sample.ogg' - dst = '/tmp/' + "".join([random.choice(string.letters) for i in xrange(10)]) + '.ogg' - self.cue_file.cue(src, dst, 5, 5) - src_length = OggVorbis(src).info.length - dst_length = OggVorbis(dst).info.length - print src + " " + str(src_length) - print dst + " " + str(dst_length) - self.assertTrue(dst_length < src_length) - -if __name__ == '__main__': - unittest.main() diff --git a/python_apps/pypo/util/__init__.py b/python_apps/pypo/util/__init__.py index 692a4b4b1..afb963b43 100755 --- a/python_apps/pypo/util/__init__.py +++ b/python_apps/pypo/util/__init__.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- from json import * -from status import * -from cue_file import * \ No newline at end of file +from status import * \ No newline at end of file diff --git a/python_apps/pypo/util/cue_file.py b/python_apps/pypo/util/cue_file.py deleted file mode 100755 index 034515f23..000000000 --- a/python_apps/pypo/util/cue_file.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -import sys -import shutil -import random -import string -import time -from datetime import timedelta -import os -import logging - -from mutagen.mp3 import MP3 -from mutagen.oggvorbis import OggVorbis - -class CueFile(): - - def __init__(self): - logger = logging.getLogger("cue_file") - logger.debug("init") - - def cue(self, src, dst, cue_in, cue_out): - - logger = logging.getLogger("cue_file") - logger.debug("cue file: %s %s %s %s", src, dst, cue_in, cue_out) - - if src.lower().endswith('.mp3'): - # mutagen - audio = MP3(src) - dur = round(audio.info.length, 3) - - logger.debug("duration by mutagen: %s", dur) - - cue_out = round(float(dur) - cue_out, 3) - - str_cue_in = str(timedelta(seconds=cue_in)).replace(".", "+") # hh:mm:ss+mss, eg 00:00:20+000 - str_cue_out = str(timedelta(seconds=cue_out)).replace(".", "+") # - - """ - now a bit a hackish part, don't know how to do this better... - need to cut the digits after the "+" - """ - ts = str_cue_in.split("+") - try: - if len(ts[1]) == 6: - ts[1] = ts[1][0:3] - str_cue_in = "%s+%s" % (ts[0], ts[1]) - except Exception, e: - pass - - ts = str_cue_out.split("+") - try: - if len(ts[1]) == 6: - ts[1] = ts[1][0:3] - str_cue_out = "%s+%s" % (ts[0], ts[1]) - except Exception, e: - pass - - logger.debug("in: %s", str_cue_in) - logger.debug("out: %s", str(str_cue_out) ) - - command = 'mp3cut -o %s -t %s-%s %s' % (dst + '.tmp.mp3', str_cue_in, str_cue_out, src); - logger.info("command: %s", command) - os.system(command + ' > /dev/null 2>&1') - - command = 'lame -b 128 %s %s' % (dst + '.tmp.mp3', dst); - logger.info("command: %s", command) - os.system(command + ' > /dev/null 2>&1') - elif src.lower().endswith('.ogg'): - audio = OggVorbis(src) - dur = audio.info.length - sys.stderr.write('duration: ' + str(dur) + '\n') - - cue_out = float(dur) - cue_out - - #convert input format of ss.mmm to milliseconds and to string< - str_cue_in = str(int(round(cue_in*1000))) - - #convert input format of ss.mmm to milliseconds and to string - str_cue_out = str(int(round(cue_out*1000))) - - command = 'oggCut -s %s -e %s %s %s' % (str_cue_in, str_cue_out, src, dst) - logger.info("command: %s", command) - os.system(command + ' > /dev/null 2>&1') - else: - logger.debug("in: %s", 'File name with invalid extension. File will not be cut\n') - - return dst