-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBastionModule.py
35 lines (24 loc) · 910 Bytes
/
BastionModule.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# BastionMod - Bastion Module
# Base class for BastionMod modules.
#
# Copyright © 2013 Marc Gagné <[email protected]>
# This work is free. You can redistribute it and/or modify it under the terms
# of the Do What The Fuck You Want To Public License, Version 2, as published
# by Sam Hocevar. See the COPYING file for more details.
import os
MODULES = []
class BastionModule:
"""Base class for BastionMod modules."""
DATA_TYPE = 'unknown'
CONTENT_DIR = ''
EXTRACT_DIR = ''
def __init__(self, debug=False):
"""Initializes the module."""
self.debug = debug
def extract(self, content_dir, extract_dir):
"""To be extended by sub-classes."""
# Create the extract dir.
if not os.path.exists(extract_dir):
os.makedirs(extract_dir)
def compile(self, extract_dir, content_dir):
"""To be extended by sub-classes."""