Skip to content

Commit

Permalink
[processing] remove duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 29, 2016
1 parent d870b73 commit d20a2ce
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions python/plugins/processing/core/AlgorithmProvider.py
Expand Up @@ -30,6 +30,7 @@
from PyQt.QtCore import QCoreApplication
from qgis.core import QgsVectorFileWriter
from processing.core.ProcessingConfig import Setting, ProcessingConfig
from processing.tools import dataobjects


class AlgorithmProvider(object):
Expand Down Expand Up @@ -105,15 +106,7 @@ def getSupportedOutputRasterLayerExtensions(self):
return ['tif']

def getSupportedOutputVectorLayerExtensions(self):
formats = QgsVectorFileWriter.supportedFiltersAndFormats()
extensions = ['shp'] # shp is the default, should be the first
for extension in formats.keys():
extension = unicode(extension)
extension = extension[extension.find('*.') + 2:]
extension = extension[:extension.find(' ')]
if extension.lower() != 'shp':
extensions.append(extension)
return extensions
return dataobjects.getSupportedOutputVectorLayerExtensions()

def getSupportedOutputTableExtensions(self):
return ['csv']
Expand Down

0 comments on commit d20a2ce

Please sign in to comment.