Completed
Push — master ( 699639...872adf )
by Tomaz
04:55
created

GetExcelSheetsAction.run()   A

Complexity

Conditions 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 2
Metric Value
cc 1
c 4
b 0
f 2
dl 0
loc 7
rs 9.4285
1
"""
2
Copyright 2016 Brocade Communications Systems, Inc.
3
Licensed under the Apache License, Version 2.0 (the "License");
4
you may not use this file except in compliance with the License.
5
You may obtain a copy of the License at
6
    http://www.apache.org/licenses/LICENSE-2.0
7
Unless required by applicable law or agreed to in writing, software
8
distributed under the License is distributed on an "AS IS" BASIS,
9
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
See the License for the specific language governing permissions and
11
limitations under the License.
12
"""
13
14
from lib import excel_action, excel_reader
15
16
17
class GetExcelSheetsAction(excel_action.ExcelAction):
18
    def run(self, excel_file=None):
19
20
        self.replace_defaults(excel_file, None, None)
21
22
        excel = excel_reader.ExcelReader(self._excel_file)
23
24
        return excel.get_sheets()
25