#21 Move helpers module to util
Merged 7 years ago by davidcarlos. Opened 7 years ago by athoscr.

Move helpers module to util
Athos Ribeiro • 7 years ago  
file modified
+1 -1
@@ -13,7 +13,7 @@ 

      - analyzers

      - converter

      - database

-     - helpers

+     - util

      - model

      - monitor

      - queue

file modified
+2 -2
@@ -7,7 +7,7 @@ 

  import fedmsg.consumers

  import time

  

- import kiskadee.helpers

+ import kiskadee.util

  import kiskadee.plugins

  import kiskadee.queue

  
@@ -113,7 +113,7 @@ 

          source_version = ''.join([source_data.get('version'), '.tar.gz'])

          homepage = source_data.get('meta').get('homepage')

          url = ''.join([homepage, '/archive/', source_version])

-         return kiskadee.helpers.download(path, url, source_version)

+         return kiskadee.util.download(path, url, source_version)

  

  

  class AnityaConsumer(fedmsg.consumers.FedmsgConsumer):

file modified
+2 -2
@@ -10,7 +10,7 @@ 

  from debian.deb822 import Sources

  import subprocess

  

- from kiskadee.helpers import chdir

+ from kiskadee.util import chdir

  import kiskadee.queue

  

  RUNNING = True
@@ -40,7 +40,7 @@ 

      def get_sources(self, source_data):

          """Download packages from some debian mirror."""

          path = tempfile.mkdtemp()

-         with kiskadee.helpers.chdir(path):

+         with kiskadee.util.chdir(path):

              url = self._dsc_url(source_data)

              try:

                  subprocess.check_output(['dget', url])

file modified
+2 -2
@@ -6,7 +6,7 @@ 

  import kiskadee.analyzers

  import kiskadee.model

  import kiskadee.database

- import kiskadee.helpers

+ import kiskadee.util

  import kiskadee.converter

  

  running = True
@@ -73,7 +73,7 @@ 

          reports = []

          path = tempfile.mkdtemp()

          shutil.unpack_archive(compressed_source, path)

-         with kiskadee.helpers.chdir(path):

+         with kiskadee.util.chdir(path):

              kiskadee.logger.debug('ANALYSIS: Unpacked!')

              analyzers = plugin.analyzers()

              for analyzer in analyzers:

kiskadee/util.py kiskadee/helpers.py
file renamed
file was moved with no change to the file

This is just to comply with other python packages pattern of adding
helper functions in an util module.

rebased

7 years ago

Pull-Request has been merged by davidcarlos

7 years ago