MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / create_directories

Method create_directories

shared.py:940–973  ·  view source on GitHub ↗

Create all necessary directories for the application.

(self)

Source from the content-addressed store, hash-verified

938 return False
939
940 changed = False
941 if self.config.get('ref_width') != profile['ref_width']:
942 self.config['ref_width'] = profile['ref_width']
943 changed = True
944 if self.config.get('ref_height') != profile['ref_height']:
945 self.config['ref_height'] = profile['ref_height']
946 changed = True
947
948 needs_orientation = set_orientation_if_missing and 'screen_reversed' not in self.config
949 if needs_orientation:
950 desired_orientation = 180 if profile.get('default_flip', False) else 0
951 if self.config.get('screen_reversed') != desired_orientation:
952 self.config['screen_reversed'] = desired_orientation
953 changed = True
954
955 if persist and changed:
956 self.save_config()
957
958 return changed
959
960 def _normalize_config_keys(self, config):
961 """Ensure legacy or malformed configuration keys are aligned with the current schema."""
962 if 'web_increment ' in config:
963 if 'web_increment' not in config:
964 config['web_increment'] = config['web_increment ']
965 del config['web_increment ']
966 return config
967
968 def _remove_legacy_attributes(self):
969 """Drop attributes created from legacy configuration keys that cannot be accessed normally."""
970 legacy_attrs = ['web_increment ']
971 for attr in legacy_attrs:
972 if hasattr(self, attr):
973 delattr(self, attr)
974
975 def update_mac_blacklist(self):
976 """Update the MAC blacklist without immediate save."""

Callers 1

setup_environmentMethod · 0.95

Calls 2

infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected