- Give code a round of indentation. Thank astyle, not me.
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@837 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
aaf8e068d3
commit
d3c7b46853
108 changed files with 3196 additions and 3180 deletions
|
@ -74,7 +74,7 @@ PythonCPUPolicyManager::~PythonCPUPolicyManager()
|
|||
void
|
||||
PythonCPUPolicyManager::init()
|
||||
{
|
||||
if(_initialized)
|
||||
if (_initialized)
|
||||
// No-op
|
||||
return;
|
||||
|
||||
|
@ -114,35 +114,35 @@ PythonCPUPolicyManager::collect_policies()
|
|||
GlobalPreferences::dir_iterator dir_it = prefs.policies_dir_begin();
|
||||
GlobalPreferences::dir_iterator dir_end = prefs.policies_dir_end();
|
||||
|
||||
for(; dir_it != dir_end; ++dir_it)
|
||||
for (; dir_it != dir_end; ++dir_it)
|
||||
{
|
||||
Glib::Dir dir(dir_it->c_str());
|
||||
|
||||
cout << "Opening directory " << *dir_it << " looking for python policies..." << endl;
|
||||
|
||||
for(Glib::DirIterator file_it = dir.begin(); file_it != dir.end(); ++file_it)
|
||||
for (Glib::DirIterator file_it = dir.begin(); file_it != dir.end(); ++file_it)
|
||||
{
|
||||
cout << "\tChecking if " << *file_it << " is a valid Python script... ";
|
||||
|
||||
Glib::PatternSpec dot_py("*.py");
|
||||
|
||||
if(dot_py.match(*file_it))
|
||||
if (dot_py.match(*file_it))
|
||||
{
|
||||
cout << "yes" << endl;
|
||||
|
||||
cout << "yes" << endl;
|
||||
|
||||
//strip extension
|
||||
std::string policy_name = (*file_it).substr(0, (*file_it).size() - 3);
|
||||
|
||||
try
|
||||
{
|
||||
PythonCPUPolicy *pypolicy = new PythonCPUPolicy(policy_name.c_str());
|
||||
{
|
||||
PythonCPUPolicy *pypolicy = new PythonCPUPolicy(policy_name.c_str());
|
||||
|
||||
_policies.push_back(pypolicy);
|
||||
}
|
||||
catch(MalformedPolicyException e)
|
||||
{
|
||||
std::cerr << "POLICY LOAD ERROR: " << e.what() << endl;
|
||||
}
|
||||
_policies.push_back(pypolicy);
|
||||
}
|
||||
catch (MalformedPolicyException e)
|
||||
{
|
||||
std::cerr << "POLICY LOAD ERROR: " << e.what() << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
cout << "no" << endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue